summaryrefslogtreecommitdiff
path: root/compiler/GHC/HsToCore
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/HsToCore')
-rw-r--r--compiler/GHC/HsToCore/Coverage.hs5
-rw-r--r--compiler/GHC/HsToCore/Expr.hs2
-rw-r--r--compiler/GHC/HsToCore/Quote.hs7
3 files changed, 5 insertions, 9 deletions
diff --git a/compiler/GHC/HsToCore/Coverage.hs b/compiler/GHC/HsToCore/Coverage.hs
index 77c6ba651c..1c6ef3eafa 100644
--- a/compiler/GHC/HsToCore/Coverage.hs
+++ b/compiler/GHC/HsToCore/Coverage.hs
@@ -846,9 +846,8 @@ addTickHsIPBinds (IPBinds dictbinds ipbinds) =
addTickIPBind :: IPBind GhcTc -> TM (IPBind GhcTc)
addTickIPBind (IPBind x nm e) =
- liftM2 (IPBind x)
- (return nm)
- (addTickLHsExpr e)
+ liftM (IPBind x nm)
+ (addTickLHsExpr e)
-- There is no location here, so we might need to use a context location??
addTickSyntaxExpr :: SrcSpan -> SyntaxExpr GhcTc -> TM (SyntaxExpr GhcTc)
diff --git a/compiler/GHC/HsToCore/Expr.hs b/compiler/GHC/HsToCore/Expr.hs
index 973d7f204f..c4dc64e58c 100644
--- a/compiler/GHC/HsToCore/Expr.hs
+++ b/compiler/GHC/HsToCore/Expr.hs
@@ -103,7 +103,7 @@ dsIPBinds (IPBinds ev_binds ip_binds) body
; foldrM ds_ip_bind inner ip_binds }
where
ds_ip_bind :: LIPBind GhcTc -> CoreExpr -> DsM CoreExpr
- ds_ip_bind (L _ (IPBind _ ~(Right n) e)) body
+ ds_ip_bind (L _ (IPBind n _ e)) body
= do e' <- dsLExpr e
return (Let (NonRec n e') body)
diff --git a/compiler/GHC/HsToCore/Quote.hs b/compiler/GHC/HsToCore/Quote.hs
index f6d718b222..5c95f14341 100644
--- a/compiler/GHC/HsToCore/Quote.hs
+++ b/compiler/GHC/HsToCore/Quote.hs
@@ -1844,11 +1844,8 @@ repBinds (HsValBinds _ decs)
; return (ss, core_list) }
rep_implicit_param_bind :: LIPBind GhcRn -> MetaM (SrcSpan, Core (M TH.Dec))
-rep_implicit_param_bind (L loc (IPBind _ ename (L _ rhs)))
- = do { name <- case ename of
- Left (L _ n) -> rep_implicit_param_name n
- Right _ ->
- panic "rep_implicit_param_bind: post typechecking"
+rep_implicit_param_bind (L loc (IPBind _ (L _ n) (L _ rhs)))
+ = do { name <- rep_implicit_param_name n
; rhs' <- repE rhs
; ipb <- repImplicitParamBind name rhs'
; return (locA loc, ipb) }