[commit: ghc] wip/ttypeable: [WIP] Coercion: Represent arrows explicitly (4206a0c)

git at git.haskell.org git at git.haskell.org
Sun Jan 29 20:17:43 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/ttypeable
Link       : http://ghc.haskell.org/trac/ghc/changeset/4206a0c764c8fcd7653ab7c3b281045dc0e6ceaa/ghc

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

commit 4206a0c764c8fcd7653ab7c3b281045dc0e6ceaa
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Sat Dec 17 21:31:33 2016 -0500

    [WIP] Coercion: Represent arrows explicitly
    
    **(This is still a work in progress)**
    
    This adds explicit representation of arrow types in coercions (via a
    `FunCo`
    constructor), following what is done with types. There are two reasons
    why we want to do this,
    
     * Function arrows are very common and therefore deserve a succinct
    representation
     * The `(->)` tycon has some magic to handle representational
    polymorphism; handling it explicitly makes this magic slightly simplier
    (although admittedly this magic may be replaced by a more principled
    solution in the near future)
    
    Test Plan: Validate
    
    Reviewers: goldfire, austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2784


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

4206a0c764c8fcd7653ab7c3b281045dc0e6ceaa
 compiler/coreSyn/CoreFVs.hs                    |   1 +
 compiler/coreSyn/CoreLint.hs                   |  33 ++++--
 compiler/coreSyn/CoreSubst.hs                  |   4 +-
 compiler/coreSyn/TrieMap.hs                    |   6 +-
 compiler/iface/ToIface.hs                      |   4 +-
 compiler/prelude/TysPrim.hs                    |  27 ++---
 compiler/specialise/Rules.hs                   |   7 ++
 compiler/typecheck/TcCanonical.hs              |   2 +-
 compiler/typecheck/TcTyDecls.hs                |   1 +
 compiler/typecheck/TcType.hs                   |  14 ++-
 compiler/typecheck/TcUnify.hs                  |   3 +
 compiler/typecheck/TcValidity.hs               |   1 +
 compiler/types/Coercion.hs                     | 140 +++++++++++++++++++---
 compiler/types/Coercion.hs-boot                |   6 +-
 compiler/types/FamInstEnv.hs                   |   1 +
 compiler/types/OptCoercion.hs                  |  15 +++
 compiler/types/TyCoRep.hs                      |  24 +++-
 compiler/types/TyCon.hs                        |   4 +-
 compiler/types/Type.hs                         | 155 ++++++++++++++++++++-----
 compiler/types/Unify.hs                        |  15 ++-
 testsuite/tests/ghci/scripts/T8535.stdout      |   2 +-
 testsuite/tests/ghci/scripts/ghci020.stdout    |   2 +-
 testsuite/tests/ghci/should_run/T10145.stdout  |   2 +-
 testsuite/tests/typecheck/should_compile/all.T |   1 +
 24 files changed, 382 insertions(+), 88 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 4206a0c764c8fcd7653ab7c3b281045dc0e6ceaa


More information about the ghc-commits mailing list