diff options
Diffstat (limited to 'compiler/GHC/HsToCore/Expr.hs')
-rw-r--r-- | compiler/GHC/HsToCore/Expr.hs | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/compiler/GHC/HsToCore/Expr.hs b/compiler/GHC/HsToCore/Expr.hs index bd84e21ace..602950bf3e 100644 --- a/compiler/GHC/HsToCore/Expr.hs +++ b/compiler/GHC/HsToCore/Expr.hs @@ -71,7 +71,6 @@ import GHC.Utils.Panic import GHC.Utils.Panic.Plain import GHC.Core.PatSyn import Control.Monad -import Data.Void( absurd ) {- ************************************************************************ @@ -262,10 +261,10 @@ dsExpr (HsUnboundVar (HER ref _ _) _) = dsEvTerm =<< readMutVar ref dsExpr (HsPar _ _ e _) = dsLExpr e dsExpr (ExprWithTySig _ e _) = dsLExpr e -dsExpr (HsIPVar {}) = panic "dsExpr: HsIPVar" +dsExpr (HsIPVar x _) = dataConCantHappen x -dsExpr (HsGetField x _ _) = absurd x -dsExpr (HsProjection x _) = absurd x +dsExpr (HsGetField x _ _) = dataConCantHappen x +dsExpr (HsProjection x _) = dataConCantHappen x dsExpr (HsLit _ lit) = do { warnAboutOverflowedLit lit @@ -736,7 +735,7 @@ Thus, we pass @r@ as the scrutinee expression to @matchWrapper@ above. -- Template Haskell stuff -dsExpr (HsRnBracketOut _ _ _) = panic "dsExpr HsRnBracketOut" +dsExpr (HsRnBracketOut x _ _) = dataConCantHappen x dsExpr (HsTcBracketOut _ hs_wrapper x ps) = dsBracket hs_wrapper x ps dsExpr (HsSpliceE _ s) = pprPanic "dsExpr:splice" (ppr s) @@ -766,13 +765,12 @@ dsExpr (HsBinTick _ ixT ixF e) = do -- HsSyn constructs that just shouldn't be here, because -- the renamer removed them. See GHC.Rename.Expr. -- Note [Handling overloaded and rebindable constructs] -dsExpr (HsOverLabel x _) = absurd x -dsExpr (OpApp x _ _ _) = absurd x -dsExpr (SectionL x _ _) = absurd x -dsExpr (SectionR x _ _) = absurd x - +dsExpr (HsOverLabel x _) = dataConCantHappen x +dsExpr (OpApp x _ _ _) = dataConCantHappen x +dsExpr (SectionL x _ _) = dataConCantHappen x +dsExpr (SectionR x _ _) = dataConCantHappen x +dsExpr (HsBracket x _) = dataConCantHappen x -- HsSyn constructs that just shouldn't be here: -dsExpr (HsBracket {}) = panic "dsExpr:HsBracket" dsExpr (HsDo {}) = panic "dsExpr:HsDo" ds_prag_expr :: HsPragE GhcTc -> LHsExpr GhcTc -> DsM CoreExpr |