Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 477 Bytes

README.md

File metadata and controls

17 lines (14 loc) · 477 Bytes

Hindley Milner Parser

A javascript Hindley-Milner parser.

const HMP = require('hindley-milner-parser-js');
HMP.parse('hello :: Foo a => a -> String');
{
  name: 'hello',
  constraints: [
    {typeclass: 'Foo', typevar: 'a'}],
  type:
    {type: 'function', text: '', children: [
      {type: 'typevar', text: 'a', children: []},
      {type: 'typeConstructor', text: 'String', children: []}]};