[commit: ghc] supercompiler: Fix mkSymCo so it actually creates a symmetric coercion (cfa06bc)

Max Bolingbroke <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : supercompiler

http://hackage.haskell.org/trac/ghc/changeset/cfa06bc2a3ea558f0b5eb7636f5fe29ca809542d

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

commit cfa06bc2a3ea558f0b5eb7636f5fe29ca809542d
Author: Max Bolingbroke <[email protected]>
Date:   Tue Oct 23 17:59:58 2012 +0100

    Fix mkSymCo so it actually creates a symmetric coercion

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

 compiler/supercompile/Supercompile/Core/Syntax.hs |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/compiler/supercompile/Supercompile/Core/Syntax.hs b/compiler/supercompile/Supercompile/Core/Syntax.hs
index f818383..2084c31 100644
--- a/compiler/supercompile/Supercompile/Core/Syntax.hs
+++ b/compiler/supercompile/Supercompile/Core/Syntax.hs
@@ -20,14 +20,17 @@ import Id       (Id, isId, idType, idInlinePragma)
 import PrimOp   (primOpType)
 import Literal  (Literal, literalType)
 import Type     (Type, mkTyVarTy, applyTy, applyTys, mkForAllTy, mkFunTy, splitFunTy_maybe, eqType)
+import TypeRep  (Type(..))
+import Kind
 import Coercion (CoVar, Coercion, coercionType, coercionKind, mkCvSubst, mkAxInstCo, mkReflCo, isReflCo)
+import qualified Coercion as Coercion
 import PrimOp   (PrimOp)
 import Pair     (pSnd)
 import PprCore  ()
 
 
 mkSymCo :: InScopeSet -> NormalCo -> NormalCo
-mkSymCo iss co = optCoercion (mkCvSubst iss []) co
+mkSymCo iss co = optCoercion (mkCvSubst iss []) (Coercion.mkSymCo co)
 
 mkTransCo :: InScopeSet -> NormalCo -> NormalCo -> NormalCo
 mkTransCo = opt_trans
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.