Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : ghc-7.2

http://hackage.haskell.org/trac/ghc/changeset/186129ff0550c769058190d76540ee8aa426a6bf

>---------------------------------------------------------------

commit 186129ff0550c769058190d76540ee8aa426a6bf
Author: Simon Peyton Jones <[email protected]>
Date:   Fri Jul 15 11:49:38 2011 +0100

    Use varToCoreExpr rather than Var (fixes #5315)
    
    A coercion variable in a term must be wrapped in a coercion!
    (Led to lint errors.)

>---------------------------------------------------------------

 compiler/basicTypes/MkId.lhs |    2 +-
 compiler/stranal/WwLib.lhs   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/basicTypes/MkId.lhs b/compiler/basicTypes/MkId.lhs
index bf58c5a..7993b05 100644
--- a/compiler/basicTypes/MkId.lhs
+++ b/compiler/basicTypes/MkId.lhs
@@ -584,7 +584,7 @@ mkProductBox arg_ids ty
     result_expr
       | isNewTyCon tycon && not (isRecursiveTyCon tycon) 
       = wrap (mkProductBox arg_ids (newTyConInstRhs tycon tycon_args))
-      | otherwise = mkConApp pack_con (map Type tycon_args ++ map Var arg_ids)
+      | otherwise = mkConApp pack_con (map Type tycon_args ++ varsToCoreExprs 
arg_ids)
 
     wrap expr = wrapNewTypeBody tycon tycon_args expr
 
diff --git a/compiler/stranal/WwLib.lhs b/compiler/stranal/WwLib.lhs
index 391c07c..1b8b270 100644
--- a/compiler/stranal/WwLib.lhs
+++ b/compiler/stranal/WwLib.lhs
@@ -449,7 +449,7 @@ mkWWcpr body_ty RetCPR
       uniqs <- getUniquesM
       let
         (wrap_wild : work_wild : args) = zipWith mk_ww_local uniqs (ubx_tup_ty 
: body_ty : con_arg_tys)
-       arg_vars                       = map Var args
+       arg_vars                       = varsToCoreExprs args
        ubx_tup_con                    = tupleCon Unboxed n_con_args
        ubx_tup_ty                     = exprType ubx_tup_app
        ubx_tup_app                    = mkConApp ubx_tup_con (map Type 
con_arg_tys   ++ arg_vars)



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to