write-you-a-haskell/chapter5/stlc
2015-02-13 17:02:53 +01:00
..
Check.hs chapter5/stlc/Check.hs: make case expression in check function more idiomatic 2015-02-13 17:02:53 +01:00
Eval.hs initial commit 2015-01-05 02:54:15 -05:00
Lexer.hs initial commit 2015-01-05 02:54:15 -05:00
Main.hs Squashed commit of the following: 2015-01-18 21:04:01 -05:00
Parser.hs initial commit 2015-01-05 02:54:15 -05:00
Pretty.hs initial commit 2015-01-05 02:54:15 -05:00
README.md initial commit 2015-01-05 02:54:15 -05:00
Setup.hs initial commit 2015-01-05 02:54:15 -05:00
stlc.cabal initial commit 2015-01-05 02:54:15 -05:00
Syntax.hs initial commit 2015-01-05 02:54:15 -05:00

Simply Typed Lambda Calculus

Simply typed lambda calculus.

To compile and run:

$ cabal run

Usage:

./stlc
Stlc> (\x : Int . \y : Int . y) 1 2
2

Stlc> (\x : (Int -> Int). x) (\x : Int . 1) 2
1

Stlc> (\x : Int . x) False
Couldn't match expected type 'Int' with actual type: 'Bool'

Stlc> (\x : Int . (\y : Int . x))
<<closure>>

License

Released under MIT license.