[commit: ghc] tc-untouchables: Implement 'left' and 'right' coercions (af7cc99)
Simon Peyton Jones
simonpj at microsoft.com
Tue Sep 18 18:45:35 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : tc-untouchables
http://hackage.haskell.org/trac/ghc/changeset/af7cc9953217d74e88d4d21512e957edd8e97ec9
>---------------------------------------------------------------
commit af7cc9953217d74e88d4d21512e957edd8e97ec9
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Mon Sep 17 11:34:28 2012 +0100
Implement 'left' and 'right' coercions
This patch finally adds 'left' and 'right' coercions back into
GHC. Trac #7205 gives the details.
The main change is to add a new constructor to Coercion:
data Coercion
= ...
| NthCo Int Coercion -- OLD, still there
| LRCo LeftOrRight Coercion -- NEW
data LeftOrRight = CLeft | CRight
Plus:
* Similar change to TcCoercion
* Use LRCo when decomposing AppTys
* Coercion optimisation needs to handle left/right
The rest is just knock-on effects.
compiler/coreSyn/CoreLint.lhs | 13 ++++++++
compiler/coreSyn/ExternalCore.lhs | 3 ++
compiler/coreSyn/MkExternalCore.lhs | 5 +++
compiler/coreSyn/PprExternalCore.lhs | 4 ++
compiler/coreSyn/TrieMap.lhs | 22 ++++++++++---
compiler/deSugar/DsBinds.lhs | 1 +
compiler/iface/BinIface.hs | 14 ++++++++-
compiler/iface/IfaceType.lhs | 5 ++-
compiler/iface/TcIface.lhs | 1 +
compiler/typecheck/TcCanonical.lhs | 14 ++-------
compiler/typecheck/TcEvidence.lhs | 14 +++++++--
compiler/typecheck/TcHsSyn.lhs | 1 +
compiler/typecheck/TcType.lhs | 1 +
compiler/types/Coercion.lhs | 31 +++++++++++++++++--
compiler/types/OptCoercion.lhs | 56 ++++++++++++++++++++++++++++-----
15 files changed, 152 insertions(+), 33 deletions(-)
Diff suppressed because of size. To see it, use:
git show af7cc9953217d74e88d4d21512e957edd8e97ec9
More information about the Cvs-ghc
mailing list