hindley-milner-parser-js
v0.1.10
Published
parse hindley milner signatures
Downloads
7
Readme
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: []}]};