X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=clash%2FCLasH%2FNormalize%2FNormalizeTypes.hs;h=f4e5e9b523eb9f3c0ace82aa90c06f6d23205ebf;hb=bebe01ce76e62bea88aba87d5cceecfab7a0c6c4;hp=07ccd977353603d990a46002c3eced2e6cd87ad6;hpb=82a01c9291c350ee8aeae80d62d6a45f7fb50940;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/clash/CLasH/Normalize/NormalizeTypes.hs b/clash/CLasH/Normalize/NormalizeTypes.hs index 07ccd97..f4e5e9b 100644 --- a/clash/CLasH/Normalize/NormalizeTypes.hs +++ b/clash/CLasH/Normalize/NormalizeTypes.hs @@ -21,13 +21,19 @@ 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 + | LetBinding [CoreSyn.CoreBndr] + -- ^ The expression is bound in a -- (recursive or non-recursive) let -- expression. - | LetBody -- ^ The expression is the body of a + | LetBody [CoreSyn.CoreBndr] + -- ^ The expression is the body of a -- let expression - | LambdaBody -- ^ The expression is the body of a + | LambdaBody CoreSyn.CoreBndr + -- ^ The expression is the body of a -- lambda abstraction + | CaseAlt CoreSyn.CoreBndr + -- ^ The expression is the body of a + -- case alternative. | Other -- ^ Another context deriving (Eq, Show) -- | Transforms a CoreExpr and keeps track if it has changed. @@ -43,11 +49,11 @@ is_appfirst_ctx _ = False is_appsecond_ctx AppSecond = True is_appsecond_ctx _ = False -is_letbinding_ctx LetBinding = True +is_letbinding_ctx (LetBinding _) = True is_letbinding_ctx _ = False -is_letbody_ctx LetBody = True +is_letbody_ctx (LetBody _) = True is_letbody_ctx _ = False -is_lambdabody_ctx LambdaBody = True +is_lambdabody_ctx (LambdaBody _) = True is_lambdabody_ctx _ = False