X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Fc%CE%BBash.git;a=blobdiff_plain;f=clash%2FCLasH%2FNormalize.hs;h=4ce4ffa53b4b189b4f7983968f5aac0a18c47ad8;hp=ea171ca05f7b783a6731845e037a4c7216ee9291;hb=a2b8cfae9cad1ad7040993f7f2458dd73fb968cd;hpb=43c7c650bb3f8ae44c4d54ed60818b384c22c3f7 diff --git a/clash/CLasH/Normalize.hs b/clash/CLasH/Normalize.hs index ea171ca..4ce4ffa 100644 --- a/clash/CLasH/Normalize.hs +++ b/clash/CLasH/Normalize.hs @@ -380,7 +380,7 @@ funextract c expr@(App _ _) | is_var fexpr = do -- We could use is_applicable here instead of is_fun, but I think -- arguments to functions could only have forall typing when existential -- typing is enabled. Not sure, though. - doarg arg | not (is_simple arg) && is_fun arg = do + doarg arg | not (is_simple arg) && is_fun arg && not (has_free_tyvars arg) = do -- Create a new top level binding that binds the argument. Its body will -- be extended with lambda expressions, to take any free variables used -- by the argument expression.