[commit: ghc] master: We need a varToCoreExpr, so that coercions appear correctly (d7f62c1)
Simon Peyton Jones
simonpj at microsoft.com
Wed Jul 27 13:36:00 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/d7f62c1a893cfcec9ab97f68e19faab52ff04be4
>---------------------------------------------------------------
commit d7f62c1a893cfcec9ab97f68e19faab52ff04be4
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Jul 27 12:35:25 2011 +0100
We need a varToCoreExpr, so that coercions appear correctly
>---------------------------------------------------------------
compiler/coreSyn/CorePrep.lhs | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/compiler/coreSyn/CorePrep.lhs b/compiler/coreSyn/CorePrep.lhs
index 6325a08..fdd9279 100644
--- a/compiler/coreSyn/CorePrep.lhs
+++ b/compiler/coreSyn/CorePrep.lhs
@@ -367,7 +367,8 @@ cpePair top_lvl is_rec is_strict_or_unlifted env bndr rhs
-- Note [Silly extra arguments]
(do { v <- newVar (idType bndr)
; let float = mkFloat False False v rhs2
- ; return (addFloat floats2 float, cpeEtaExpand arity (Var v)) })
+ ; return ( addFloat floats2 float
+ , cpeEtaExpand arity (Var v)) })
-- Record if the binder is evaluated
-- and otherwise trim off the unfolding altogether
@@ -655,7 +656,7 @@ cpeArg env is_strict arg arg_ty
{ v <- newVar arg_ty
; let arg3 = cpeEtaExpand (exprArity arg2) arg2
arg_float = mkFloat is_strict is_unlifted v arg3
- ; return (addFloat floats2 arg_float, Var v) } }
+ ; return (addFloat floats2 arg_float, varToCoreExpr v) } }
where
is_unlifted = isUnLiftedType arg_ty
want_float = wantFloatNested NonRecursive (is_strict || is_unlifted)
More information about the Cvs-ghc
mailing list