Add a CaseAlt constructor to CoreContext.
[matthijs/master-project/cλash.git] / clash / CLasH / Normalize / NormalizeTools.hs
index 307795634463313631079e0ed058669a9745f227..0652081760d8f646a19823343a95e84c10bf665e 100644 (file)
@@ -113,7 +113,7 @@ subeverywhere trans c (Case scrut b t alts) = do
   where
     transalt :: CoreAlt -> TransformMonad CoreAlt
     transalt (con, binders, expr) = do
-      expr' <- trans (Other:c) expr
+      expr' <- trans ((CaseAlt b):c) expr
       return (con, binders, expr')
 
 subeverywhere trans c (Var x) = return $ Var x