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

On branch  : overlapping-tyfams

http://hackage.haskell.org/trac/ghc/changeset/566237c0bbaf1f9bcbc43f0dd43b1c4dbf0b90dd

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

commit 566237c0bbaf1f9bcbc43f0dd43b1c4dbf0b90dd
Author: Richard Eisenberg <e...@cis.upenn.edu>
Date:   Fri Dec 21 20:36:19 2012 -0500

    Edited added code to work with overlapping tyfams.

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

 compiler/basicTypes/MkId.lhs |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/compiler/basicTypes/MkId.lhs b/compiler/basicTypes/MkId.lhs
index e458e93..6811b11 100644
--- a/compiler/basicTypes/MkId.lhs
+++ b/compiler/basicTypes/MkId.lhs
@@ -48,7 +48,8 @@ import TysPrim
 import TysWiredIn
 import PrelRules
 import Type
-import Coercion                ( mkReflCo, mkAxInstCo, mkSymCo, coercionKind, 
mkUnsafeCo )
+import Coercion                ( mkReflCo, mkAxInstCo, mkSymCo, coercionKind, 
mkUnsafeCo,
+                          mkUnbranchedAxInstCo )
 import TcType
 import MkCore
 import CoreUtils       ( exprType, mkCast )
@@ -649,7 +650,7 @@ dataConArgUnpack arg_ty
     unbox_tc_app tc tc_args con
       | isNewTyCon tc
       , let rep_ty = newTyConInstRhs tc tc_args
-            co     = mkAxInstCo (newTyConCo tc) tc_args  -- arg_ty ~ rep_ty
+            co     = mkUnbranchedAxInstCo (newTyConCo tc) tc_args  -- arg_ty ~ 
rep_ty
       , (yes, rep_tys, unbox_rep, box_rep) <- dataConArgUnpack rep_ty
       = ( yes, rep_tys
         , \ arg_id ->
@@ -663,7 +664,7 @@ dataConArgUnpack arg_ty
                        UnitBox -> do { rep_id <- newLocal (substTy subst 
rep_ty)
                                      ; return ([rep_id], Var rep_id) }
                        Boxer boxer -> boxer subst
-             ; let sco = mkAxInstCo (newTyConCo tc) (substTys subst tc_args)
+             ; let sco = mkUnbranchedAxInstCo (newTyConCo tc) (substTys subst 
tc_args)
              ; return (rep_ids, rep_expr `Cast` mkSymCo sco) } )
         
       | otherwise



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to