X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=c%CE%BBash%2FCLasH%2FNormalize%2FNormalizeTools.hs;h=7a187f859468076873cd5601849793bd2a3bc057;hb=7eed9f7f33ef0a7b8ac307af9249a379692dd21d;hp=3da2728176ec42b95e8cbf5a267f2d07658038e9;hpb=339dab663321157d33d724846a7cec084b0da81e;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 3da2728..7a187f8 100644 --- "a/c\316\273ash/CLasH/Normalize/NormalizeTools.hs" +++ "b/c\316\273ash/CLasH/Normalize/NormalizeTools.hs" @@ -209,9 +209,12 @@ isUserDefined bndr = str `notElem` compiler_names -- into hardware. Note that if a binder is not normalizable, it might become -- so using argument propagation. isNormalizeable :: CoreBndr -> TransformMonad Bool -isNormalizeable bndr = do +isNormalizeable bndr = Trans.lift (isNormalizeable' bndr) + +isNormalizeable' :: CoreBndr -> TranslatorSession Bool +isNormalizeable' bndr = do let ty = Id.idType bndr let (arg_tys, res_ty) = Type.splitFunTys ty -- This function is normalizable if all its arguments and return value are -- representable. - andM $ mapM isRepr (res_ty:arg_tys) + andM $ mapM isRepr' (res_ty:arg_tys)