summaryrefslogtreecommitdiff
path: root/compiler/GHC/HsToCore/Utils.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2020-08-24 09:37:21 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-08-25 07:38:16 -0400
commitfb77207a23deade8e3f8598c34598535711264cc (patch)
tree69d735724ad944c454eee0c0f532304c041fabc2 /compiler/GHC/HsToCore/Utils.hs
parentdb8793ad417ebfcb57d42e8111674a90706a7918 (diff)
downloadhaskell-fb77207a23deade8e3f8598c34598535711264cc.tar.gz
Use LIdP rather than (XRec p (IdP p))
This patch mainly just replaces use of XRec p (IdP p) with LIdP p One slightly more significant change is to parameterise HsPatSynDetails over the pass rather than the argument type, so that it's uniform with HsConDeclDetails and HsConPatDetails. I also got rid of the dead code GHC.Hs.type.conDetailsArgs But this is all just minor refactoring. No change in functionality.
Diffstat (limited to 'compiler/GHC/HsToCore/Utils.hs')
-rw-r--r--compiler/GHC/HsToCore/Utils.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/GHC/HsToCore/Utils.hs b/compiler/GHC/HsToCore/Utils.hs
index 4f0da28586..b4d1b1b761 100644
--- a/compiler/GHC/HsToCore/Utils.hs
+++ b/compiler/GHC/HsToCore/Utils.hs
@@ -900,7 +900,7 @@ CPR-friendly. This matters a lot: if you don't get it right, you lose
the tail call property. For example, see #3403.
-}
-dsHandleMonadicFailure :: Outputable (IdP p) => HsStmtContext p -> LPat GhcTc -> MatchResult CoreExpr -> FailOperator GhcTc -> DsM CoreExpr
+dsHandleMonadicFailure :: HsStmtContext GhcRn -> LPat GhcTc -> MatchResult CoreExpr -> FailOperator GhcTc -> DsM CoreExpr
-- In a do expression, pattern-match failure just calls
-- the monadic 'fail' rather than throwing an exception
dsHandleMonadicFailure ctx pat match m_fail_op =
@@ -921,8 +921,9 @@ dsHandleMonadicFailure ctx pat match m_fail_op =
fail_expr <- dsSyntaxExpr fail_op [fail_msg]
body fail_expr
-mk_fail_msg :: Outputable (IdP p) => DynFlags -> HsStmtContext p -> Located e -> String
-mk_fail_msg dflags ctx pat = showPpr dflags $ text "Pattern match failure in" <+> pprStmtContext ctx <+> text "at" <+> ppr (getLoc pat)
+mk_fail_msg :: DynFlags -> HsStmtContext GhcRn -> Located e -> String
+mk_fail_msg dflags ctx pat
+ = showPpr dflags $ text "Pattern match failure in" <+> pprStmtContext ctx <+> text "at" <+> ppr (getLoc pat)
{- *********************************************************************
* *