#7205: Re-introduce left/right coercion decomposition
---------------------------------+------------------------------------------
    Reporter:  simonpj           |       Owner:                  
        Type:  feature request   |      Status:  new             
    Priority:  normal            |   Milestone:                  
   Component:  Compiler          |     Version:  7.4.2           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by simonpj@…):

 commit af7cc9953217d74e88d4d21512e957edd8e97ec9
 {{{
 Author: Simon Peyton Jones <simo...@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(-)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7205#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to