Skip to content

bugarela/tipos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tipos

My journey studying type inference in Haskell.

You can find here an implementation of a very simple type inferer for the following:

  • Lambda abstractions
  • +, -, *, /, ==, >=, <=, > and < operators
  • if and case expressions
  • let expressions

Parser

This: parseExpr "\\x.\\y.x+y"

Will give you this: Right (Lam "x" (Lam "y" (App (App (Var "+") (Var "x")) (Var "y"))))

Type inferer

This: typeOf "\\x.\\y.x+y"

Will give you this: Int->Int->Int

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published