X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=c%CE%BBash%2FCLasH%2FNormalize%2FNormalizeTools.hs;fp=c%CE%BBash%2FCLasH%2FNormalize%2FNormalizeTools.hs;h=3da2728176ec42b95e8cbf5a267f2d07658038e9;hb=339dab663321157d33d724846a7cec084b0da81e;hp=187c6f9ba76946990b5f78473dcab71556c9af05;hpb=d59ed8de0b03c0eeba23f5a5e08f3c24b87dc3ab;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git "a/c\316\273ash/CLasH/Normalize/NormalizeTools.hs" "b/c\316\273ash/CLasH/Normalize/NormalizeTools.hs" index 187c6f9..3da2728 100644 --- "a/c\316\273ash/CLasH/Normalize/NormalizeTools.hs" +++ "b/c\316\273ash/CLasH/Normalize/NormalizeTools.hs" @@ -178,9 +178,12 @@ substitute_clone find repl expr = subeverywhere (substitute_clone find repl) exp -- Is the given expression representable at runtime, based on the type? isRepr :: (CoreTools.TypedThing t) => t -> TransformMonad Bool -isRepr tything = case CoreTools.getType tything of +isRepr tything = Trans.lift (isRepr' tything) + +isRepr' :: (CoreTools.TypedThing t) => t -> TranslatorSession Bool +isRepr' tything = case CoreTools.getType tything of Nothing -> return False - Just ty -> Trans.lift $ MonadState.lift tsType $ VHDLTools.isReprType ty + Just ty -> MonadState.lift tsType $ VHDLTools.isReprType ty is_local_var :: CoreSyn.CoreExpr -> TranslatorSession Bool is_local_var (CoreSyn.Var v) = do