Refactor named wildcards (again)
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 22 Dec 2015 16:28:50 +0000 (16:28 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 22 Dec 2015 16:35:39 +0000 (16:35 +0000)
commit575a98e4d245c1e60526ed6d6711d96cea08e9d2
tree34b4945dd5648a47c43d345b787ad151877b7f0b
parent01b0461e923788e825392d55d625f70c36ca3c20
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.
16 files changed:
compiler/basicTypes/RdrName.hs
compiler/deSugar/DsMeta.hs
compiler/hsSyn/Convert.hs
compiler/hsSyn/HsTypes.hs
compiler/prelude/THNames.hs
compiler/rename/RnSource.hs
compiler/rename/RnTypes.hs
libraries/template-haskell/Language/Haskell/TH/Lib.hs
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
testsuite/tests/ghci/scripts/T11098.stdout
testsuite/tests/partial-sigs/should_compile/Splices.hs
testsuite/tests/partial-sigs/should_compile/SplicesUsed.hs
testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.hs
testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr
utils/haddock