diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-12-22 16:28:50 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-12-22 16:35:39 +0000 |
commit | 575a98e4d245c1e60526ed6d6711d96cea08e9d2 (patch) | |
tree | 34b4945dd5648a47c43d345b787ad151877b7f0b /compiler/hsSyn/Convert.hs | |
parent | 01b0461e923788e825392d55d625f70c36ca3c20 (diff) | |
download | haskell-575a98e4d245c1e60526ed6d6711d96cea08e9d2.tar.gz |
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.
Diffstat (limited to 'compiler/hsSyn/Convert.hs')
-rw-r--r-- | compiler/hsSyn/Convert.hs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/hsSyn/Convert.hs b/compiler/hsSyn/Convert.hs index 4b79922863..6269a8be30 100644 --- a/compiler/hsSyn/Convert.hs +++ b/compiler/hsSyn/Convert.hs @@ -1142,13 +1142,9 @@ cvtTypeKind ty_str ty LitT lit -> returnL (HsTyLit (cvtTyLit lit)) - WildCardT Nothing + WildCardT -> mk_apps mkAnonWildCardTy tys' - WildCardT (Just nm) - -> do { nm' <- tNameL nm - ; mk_apps (mkNamedWildCardTy nm') tys' } - InfixT t1 s t2 -> do { s' <- tconName s ; t1' <- cvtType t1 |