Commit 9ca0a586 authored by's avatar
Browse files

Add missing Cast cases to libCase and scExpr

parent 14d5afa7
......@@ -225,6 +225,7 @@ libCase env (Lit lit) = Lit lit
libCase env (Type ty) = Type ty
libCase env (App fun arg) = App (libCase env fun) (libCase env arg)
libCase env (Note note body) = Note note (libCase env body)
libCase env (Cast e co) = Cast (libCase env e) co
libCase env (Lam binder body)
= Lam binder (libCase (addBinders env [binder]) body)
......@@ -636,6 +636,8 @@ scExpr env e@(Lit l) = returnUs (nullUsage, e)
scExpr env e@(Var v) = returnUs (varUsage env v UnkOcc, e)
scExpr env (Note n e) = scExpr env e `thenUs` \ (usg,e') ->
returnUs (usg, Note n e')
scExpr env (Cast e co)= scExpr env e `thenUs` \ (usg,e') ->
returnUs (usg, Cast e' co)
scExpr env (Lam b e) = scExpr (extendBndr env b) e `thenUs` \ (usg,e') ->
returnUs (usg, Lam b e')
Markdown is supported
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