diff options
Diffstat (limited to 'compiler/GHC/Hs/Extension.hs')
-rw-r--r-- | compiler/GHC/Hs/Extension.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/GHC/Hs/Extension.hs b/compiler/GHC/Hs/Extension.hs index 0a43cb8aa6..99b0bbc1ab 100644 --- a/compiler/GHC/Hs/Extension.hs +++ b/compiler/GHC/Hs/Extension.hs @@ -32,6 +32,8 @@ import GHC.Types.SrcLoc (GenLocated(..), unLoc) import GHC.Utils.Panic import GHC.Parser.Annotation +import Data.Void + {- Note [IsPass] ~~~~~~~~~~~~~ @@ -217,6 +219,10 @@ type OutputableBndrId pass = , IsPass pass ) +-- | See Note [Constructor cannot occur] +dataConCantHappen :: Void -> a +dataConCantHappen = absurd + -- useful helper functions: pprIfPs :: forall p. IsPass p => (p ~ 'Parsed => SDoc) -> SDoc pprIfPs pp = case ghcPass @p of GhcPs -> pp |