diff options
author | DanielRrr <daniel.rogozin@serokell.io> | 2021-11-03 20:51:12 +0300 |
---|---|---|
committer | DanielRrr <daniel.rogozin@serokell.io> | 2022-07-23 16:12:34 +0300 |
commit | 189006c491224a6d264906003b426d659f5adcc3 (patch) | |
tree | 70051548af0d152afa7f748fd75b618297fd9f27 | |
parent | 55a780f325fadc957c750a956c79af60dfb49ca0 (diff) | |
download | haskell-189006c491224a6d264906003b426d659f5adcc3.tar.gz |
parser and renamer checkpoint
-rw-r--r-- | compiler/GHC/Hs/Pat.hs | 6 | ||||
-rw-r--r-- | compiler/GHC/HsToCore/Pmc/Desugar.hs | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/compiler/GHC/Hs/Pat.hs b/compiler/GHC/Hs/Pat.hs index 5bda8eed91..57e11d766e 100644 --- a/compiler/GHC/Hs/Pat.hs +++ b/compiler/GHC/Hs/Pat.hs @@ -175,11 +175,13 @@ type instance XHsFieldBind _ = EpAnn [AddEpAnn] type instance XVisPat (GhcPass _) = NoExtField -type instance XInvisTyVarPat (GhcPass _) = NoExtField +type instance XInvisTyVarPat GhcPs = NoExtField +type instance XInvisTyVarPat GhcRn = NoExtField +type instance XInvisTyVarPat GhcTc = DataConCantHappen type instance XInvisWildTyPat GhcPs = NoExtField type instance XInvisWildTyPat GhcRn = NoExtField -type instance XInvisWildTyPat GhcTc = Type +type instance XInvisWildTyPat GhcTc = DataConCantHappen type instance XXMatchPat (GhcPass _) = DataConCantHappen diff --git a/compiler/GHC/HsToCore/Pmc/Desugar.hs b/compiler/GHC/HsToCore/Pmc/Desugar.hs index 3b3ace347c..272021b6c9 100644 --- a/compiler/GHC/HsToCore/Pmc/Desugar.hs +++ b/compiler/GHC/HsToCore/Pmc/Desugar.hs @@ -257,7 +257,8 @@ desugarLPat x = desugarPat x . unLoc -- | Desugar a match pattern desugarLMatchPat :: Id -> LMatchPat GhcTc -> DsM [PmGrd] desugarLMatchPat x (L _ (VisPat _ pat)) = desugarLPat x pat -desugarLMatchPat _ _ = panic "desugarLMatchPat" +desugarLMatchPat _ (L _ (InvisTyVarPat x _)) = dataConCantHappen x +desugarLMatchPat _ (L _ (InvisWildTyPat x)) = dataConCantHappen x -- | 'desugarLPat', but also select and return a new match var. desugarLPatV :: LPat GhcTc -> DsM (Id, [PmGrd]) |