mirror of
https://github.com/sdiehl/write-you-a-haskell.git
synced 2024-09-11 11:46:57 +03:00
.. | ||
Check.hs | ||
Eval.hs | ||
Lexer.hs | ||
Main.hs | ||
Parser.hs | ||
Pretty.hs | ||
README.md | ||
Setup.hs | ||
stlc.cabal | ||
Syntax.hs |
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.