From: kevind@bu.edu Date: Tue, 1 Aug 2006 10:50:31 +0000 (+0000) Subject: Add missing Cast cases to libCase and scExpr X-Git-Tag: After_FC_branch_merge~181 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=9ca0a5863ed537090f2a3fda0ac69818a44fc218 Add missing Cast cases to libCase and scExpr --- diff --git a/compiler/simplCore/LiberateCase.lhs b/compiler/simplCore/LiberateCase.lhs index c29a5b9..eebb11c 100644 --- a/compiler/simplCore/LiberateCase.lhs +++ b/compiler/simplCore/LiberateCase.lhs @@ -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) diff --git a/compiler/specialise/SpecConstr.lhs b/compiler/specialise/SpecConstr.lhs index afd53de..65835d9 100644 --- a/compiler/specialise/SpecConstr.lhs +++ b/compiler/specialise/SpecConstr.lhs @@ -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')