Add todos
This commit is contained in:
parent
9a5a5d683f
commit
f6ada75b3c
@ -119,10 +119,10 @@
|
||||
[(leqE l r) (num2 l r (boolT))]
|
||||
[(varE s) (type-lookup s env)]
|
||||
[(lamE name te body) (arrowT (interp-te te) (typecheck body (type-extend env name (interp-te te))))]
|
||||
[(appE fn arg) (type-case Type (typecheck fn env)
|
||||
[(appE fn arg) (type-case Type (typecheck fn env) ; todo use local to reduce duplicate calls
|
||||
[(arrowT a b) (typecheck fn env)]
|
||||
[else (error 'app "Function application must be a function")])]
|
||||
[(ifE c t f) (if (equal? (typecheck c env) (boolT))
|
||||
[(ifE c t f) (if (equal? (typecheck c env) (boolT)) ; todo use type case/local to reduce duplicate calls`
|
||||
(if (equal? (typecheck t env) (typecheck f env))
|
||||
(typecheck t env)
|
||||
(error 'if "Both if conditions must be of the same type"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user