summaryrefslogtreecommitdiff
path: root/compiler/deSugar/DsMeta.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-12-22 16:28:50 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2015-12-22 16:35:39 +0000
commit575a98e4d245c1e60526ed6d6711d96cea08e9d2 (patch)
tree34b4945dd5648a47c43d345b787ad151877b7f0b /compiler/deSugar/DsMeta.hs
parent01b0461e923788e825392d55d625f70c36ca3c20 (diff)
downloadhaskell-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/deSugar/DsMeta.hs')
-rw-r--r--compiler/deSugar/DsMeta.hs7
1 files changed, 0 insertions, 7 deletions
diff --git a/compiler/deSugar/DsMeta.hs b/compiler/deSugar/DsMeta.hs
index f56f446a12..5153dd96f2 100644
--- a/compiler/deSugar/DsMeta.hs
+++ b/compiler/deSugar/DsMeta.hs
@@ -965,9 +965,6 @@ repTy (HsTyLit lit) = do
lit' <- repTyLit lit
repTLit lit'
repTy (HsWildCardTy (AnonWildCard _)) = repTWildCard
-repTy (HsWildCardTy (NamedWildCard (L _ n))) = do
- nwc <- lookupOcc n
- repTNamedWildCard nwc
repTy ty = notHandled "Exotic form of type" (ppr ty)
@@ -2045,10 +2042,6 @@ repTLit (MkC lit) = rep2 litTName [lit]
repTWildCard :: DsM (Core TH.TypeQ)
repTWildCard = rep2 wildCardTName []
-repTNamedWildCard :: Core TH.Name -> DsM (Core TH.TypeQ)
-repTNamedWildCard (MkC s) = rep2 namedWildCardTName [s]
-
-
--------- Type constructors --------------
repNamedTyCon :: Core TH.Name -> DsM (Core TH.TypeQ)