projects
/
matthijs
/
master-project
/
cλash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
43c7c65
)
Do not function extract functions that still have free type variables
author
christiaanb
<christiaan.baaij@gmail.com>
Tue, 8 Jun 2010 13:43:39 +0000
(15:43 +0200)
committer
christiaanb
<christiaan.baaij@gmail.com>
Tue, 8 Jun 2010 13:43:39 +0000
(15:43 +0200)
clash/CLasH/Normalize.hs
patch
|
blob
|
history
diff --git
a/clash/CLasH/Normalize.hs
b/clash/CLasH/Normalize.hs
index ea171ca05f7b783a6731845e037a4c7216ee9291..4ce4ffa53b4b189b4f7983968f5aac0a18c47ad8 100644
(file)
--- 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.
-- 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.
-- 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.