X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;ds=sidebyside;f=clash%2FCLasH%2FNormalize.hs;h=a70829ade05370f51d66c9dbe0575e8e124ef97c;hb=c86f74b8af5fb3ca467c7a22fa2d14498b46fb1a;hp=4ce4ffa53b4b189b4f7983968f5aac0a18c47ad8;hpb=a2b8cfae9cad1ad7040993f7f2458dd73fb968cd;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/clash/CLasH/Normalize.hs b/clash/CLasH/Normalize.hs index 4ce4ffa..a70829a 100644 --- a/clash/CLasH/Normalize.hs +++ b/clash/CLasH/Normalize.hs @@ -753,7 +753,7 @@ inlinenonrepresult :: Transform -- that is fully applied (i.e., dos not have a function type) but is not -- representable. We apply in any context, since non-representable -- expressions are generally left alone and can occur anywhere. -inlinenonrepresult context expr | not (is_fun expr) = +inlinenonrepresult context expr | not (is_applicable expr) && not (has_free_tyvars expr) = case collectArgs expr of (Var f, args) | not (Id.isDictId f) -> do repr <- isRepr expr @@ -952,7 +952,7 @@ letmerge c expr = return expr -- What transforms to run? transforms = [ ("inlinedict", inlinedict) , ("inlinetoplevel", inlinetoplevel) - -- , ("inlinenonrepresult", inlinenonrepresult) + , ("inlinenonrepresult", inlinenonrepresult) , ("knowncase", knowncase) , ("classopresolution", classopresolution) , ("argprop", argprop)