Now works, just had to be lazy in the lookup
This commit is contained in:
@ -69,7 +69,11 @@ lookupExp =
|
|||||||
"\\c. rec lookup = \\xs. case xs of \
|
"\\c. rec lookup = \\xs. case xs of \
|
||||||
\ { Cons(b,bs) -> \
|
\ { Cons(b,bs) -> \
|
||||||
\ case b of \
|
\ case b of \
|
||||||
\ { Branch(c', xs, e') -> if (equal c c') Pair(xs,e') (lookup bs) } \
|
\ { Branch(c', xs, e') -> case (equal c c') of \
|
||||||
|
\ { True() -> Pair(xs,e') \
|
||||||
|
\ ; False() -> lookup bs \
|
||||||
|
\ } \
|
||||||
|
\ } \
|
||||||
\ }"
|
\ }"
|
||||||
|
|
||||||
substsExp :: Exp
|
substsExp :: Exp
|
||||||
|
|||||||
Reference in New Issue
Block a user