Commit 80ccd987 authored by Nicolas Lenz's avatar Nicolas Lenz
Browse files

Update readme

parent 1398c871
......@@ -2,7 +2,7 @@
Testing out various type systems in Haskell.
Currently allows for primitive expressions to be evaluated allowing for "true", "false", "if E then E else E", "0", "succ E", "pred E", "isZero E" and "(E)" where E is an expression.
Currently allows for primitive expressions to be evaluated and typeckecked allowing for "true", "false", "if E then E else E", "0", "succ E", "pred E", "isZero E" and "(E)" where E is an expression.
Run with `stack run` to open the test shell interface. Enter an expression in the shell to see it parsed and evaluated.
......@@ -11,6 +11,15 @@ E.g.
```
expr> if (isZero (succ 0)) then succ 0 else pred (succ 0)
Term: If (IsZero (Succ Zero)) (Succ Zero) (Pred (Succ Zero))
Type: Just TNat
Result: Just Zero
expr> isZero (succ 0)
Term: IsZero (Succ Zero)
Type: Just TBool
Result: Just EFalse
expr> isZero (succ true)
Term: IsZero (Succ ETrue)
Type: Nothing
Result: Just EFalse
expr>
```
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment