projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 1999-06-08 16:46:44 by simonpj]
[ghc-hetmet.git]
/
ghc
/
compiler
/
simplCore
/
FloatIn.lhs
diff --git
a/ghc/compiler/simplCore/FloatIn.lhs
b/ghc/compiler/simplCore/FloatIn.lhs
index
53188ba
..
6fc36c8
100644
(file)
--- a/
ghc/compiler/simplCore/FloatIn.lhs
+++ b/
ghc/compiler/simplCore/FloatIn.lhs
@@
-142,6
+142,11
@@
fiExpr to_drop (_, AnnType ty) = ASSERT( null to_drop )
Type ty
fiExpr to_drop (_, AnnCon c args)
Type ty
fiExpr to_drop (_, AnnCon c args)
+ | isDataCon c -- Don't float into the args of a data construtor;
+ -- the simplifier will float straight back out
+ = mkCoLets' to_drop (Con c (map (fiExpr []) args))
+
+ | otherwise
= mkCoLets' drop_here (Con c args')
where
(drop_here : arg_drops) = sepBindsByDropPoint (map freeVarsOf args) to_drop
= mkCoLets' drop_here (Con c args')
where
(drop_here : arg_drops) = sepBindsByDropPoint (map freeVarsOf args) to_drop