STLC BI and HM compatible
This commit is contained in:
parent
02c43751c4
commit
bb40cbba2a
2 changed files with 2 additions and 1 deletions
|
|
@ -85,6 +85,7 @@ eq t1 t2 = case t1 of
|
||||||
True => r
|
True => r
|
||||||
_ => False
|
_ => False
|
||||||
|
|
||||||
|
.++ : List a -> List a -> List a
|
||||||
.++ xs ys = case xs of
|
.++ xs ys = case xs of
|
||||||
Nil => ys
|
Nil => ys
|
||||||
Cons a as => Cons a (as ++ ys)
|
Cons a as => Cons a (as ++ ys)
|
||||||
|
|
@ -108,6 +109,6 @@ pretty t = case t of
|
||||||
getType c e = case infer c e of
|
getType c e = case infer c e of
|
||||||
Nothing => printStr "fail"
|
Nothing => printStr "fail"
|
||||||
Just p => case p of
|
Just p => case p of
|
||||||
Pair t _ => printStr (pretty t)
|
Pair t e => printStr (pretty t)
|
||||||
|
|
||||||
main = getType emptyCtx expression
|
main = getType emptyCtx expression
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue