Add LambdaBody to CoreContext.
[matthijs/master-project/cλash.git] / cλash / CLasH / Normalize / NormalizeTypes.hs
index 90592526f507b63353e0d4bad2cf6c3ee20fa8fa..80d39ac19ce10dbfccb75af33057a49e24f0c9a1 100644 (file)
@@ -21,7 +21,13 @@ data CoreContext = AppFirst        -- ^ The expression is the first
                  | AppSecond       -- ^ The expression is the second
                                    --   argument of an application
                                    --   (i.e., something is applied to it)
+                 | LetBinding      -- ^ The expression is bound in a
+                                   --   (recursive or non-recursive) let
+                                   --   expression.
+                 | LetBody         -- ^ The expression is the body of a
+                                   --   let expression
+                 | LambdaBody      -- ^ The expression is the body of a
+                                   --   lambda abstraction
                  | Other           -- ^ Another context
-
 -- | Transforms a CoreExpr and keeps track if it has changed.
 type Transform = [CoreContext] -> CoreSyn.CoreExpr -> TransformMonad CoreSyn.CoreExpr