[commit: ghc] master: Refactor named wildcards (again) (575a98e)

git at git.haskell.org git at git.haskell.org
Tue Dec 22 17:27:30 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/575a98e4d245c1e60526ed6d6711d96cea08e9d2/ghc

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

commit 575a98e4d245c1e60526ed6d6711d96cea08e9d2
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Dec 22 16:28:50 2015 +0000

    Refactor named wildcards (again)
    
    Michal's work on #10982, #11098, refactored the handling of named
    wildcards by making them more like ordinary type variables.
    
    This patch takes the same idea to its logical conclusion, resulting
    in a much tidier, tighter implementation.
    
    Read Note [The wildcard story for types] in HsTypes.
    
    Changes:
    
     * Named wildcards are ordinary type variables, throughout
    
     * HsType no longer has a data constructor for named wildcards
       (was NamedWildCard in HsWildCardInfo).  Named wildcards are
       simply HsTyVars
    
     * Similarly named wildcards disappear from Template Haskell
    
     * I refactored RnTypes to avoid polluting LocalRdrEnv with something
       as narrow as named wildcards.  Instead the named wildcard set is
       carried in RnTyKiEnv.
    
    There is a submodule update for Haddock.


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

575a98e4d245c1e60526ed6d6711d96cea08e9d2
 compiler/basicTypes/RdrName.hs                     |  32 +-
 compiler/deSugar/DsMeta.hs                         |   7 -
 compiler/hsSyn/Convert.hs                          |   6 +-
 compiler/hsSyn/HsTypes.hs                          |  83 ++-
 compiler/prelude/THNames.hs                        |   9 +-
 compiler/rename/RnSource.hs                        |   2 +-
 compiler/rename/RnTypes.hs                         | 702 ++++++++++-----------
 .../template-haskell/Language/Haskell/TH/Lib.hs    |   5 +-
 .../template-haskell/Language/Haskell/TH/Ppr.hs    |   2 +-
 .../template-haskell/Language/Haskell/TH/Syntax.hs |   2 +-
 testsuite/tests/ghci/scripts/T11098.stdout         |   2 +-
 .../tests/partial-sigs/should_compile/Splices.hs   |   4 +-
 .../partial-sigs/should_compile/SplicesUsed.hs     |   4 +-
 .../should_fail/NamedExtraConstraintsWildcard.hs   |   2 +-
 .../NamedExtraConstraintsWildcard.stderr           |  14 +-
 utils/haddock                                      |   2 +-
 16 files changed, 410 insertions(+), 468 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 575a98e4d245c1e60526ed6d6711d96cea08e9d2


More information about the ghc-commits mailing list