From 9ca0a5863ed537090f2a3fda0ac69818a44fc218 Mon Sep 17 00:00:00 2001 From: "kevind@bu.edu" Date: Tue, 1 Aug 2006 10:50:31 +0000 Subject: [PATCH] Add missing Cast cases to libCase and scExpr --- compiler/simplCore/LiberateCase.lhs | 1 + compiler/specialise/SpecConstr.lhs | 2 ++ 2 files changed, 3 insertions(+) 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') -- 1.7.10.4