summaryrefslogtreecommitdiff
path: root/compiler/GHC/Hs/Expr.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Hs/Expr.hs')
-rw-r--r--compiler/GHC/Hs/Expr.hs17
1 files changed, 11 insertions, 6 deletions
diff --git a/compiler/GHC/Hs/Expr.hs b/compiler/GHC/Hs/Expr.hs
index be7af5002a..b9b0e726a7 100644
--- a/compiler/GHC/Hs/Expr.hs
+++ b/compiler/GHC/Hs/Expr.hs
@@ -150,7 +150,7 @@ mkSyntaxExpr = SyntaxExprRn
-- | Make a 'SyntaxExpr' from a 'Name' (the "rn" is because this is used in the
-- renamer).
mkRnSyntaxExpr :: Name -> SyntaxExprRn
-mkRnSyntaxExpr name = SyntaxExprRn $ HsVar noExtField $ noLocA name
+mkRnSyntaxExpr name = SyntaxExprRn $ HsVar noExtField $ noLocN name
instance Outputable SyntaxExprRn where
ppr (SyntaxExprRn expr) = ppr expr
@@ -2188,13 +2188,13 @@ type instance Anno (HsCmd (GhcPass p)) = SrcSpanAnnA
type instance Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))]
= SrcSpanAnnL
-type instance Anno (HsCmdTop (GhcPass p)) = SrcAnn NoEpAnns
+type instance Anno (HsCmdTop (GhcPass p)) = EpAnnS NoEpAnns
type instance Anno [LocatedA (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p))))] = SrcSpanAnnL
type instance Anno [LocatedA (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p))))] = SrcSpanAnnL
type instance Anno (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) = SrcSpanAnnA
type instance Anno (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) = SrcSpanAnnA
-type instance Anno (GRHS (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) = SrcAnn NoEpAnns
-type instance Anno (GRHS (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) = SrcAnn NoEpAnns
+type instance Anno (GRHS (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) = EpAnnS NoEpAnns
+type instance Anno (GRHS (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) = EpAnnS NoEpAnns
type instance Anno (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr)))) = SrcSpanAnnA
type instance Anno (HsUntypedSplice (GhcPass p)) = SrcSpanAnnA
@@ -2209,6 +2209,11 @@ type instance Anno FastString = SrcAnn NoEpAnns
type instance Anno (DotFieldOcc (GhcPass p)) = SrcAnn NoEpAnns
-instance (Anno a ~ SrcSpanAnn' (EpAnn an))
- => WrapXRec (GhcPass p) a where
+instance (Anno
+ [LocatedA (StmtLR (GhcPass idL) (GhcPass idR) body)] ~ SrcAnn an,
+ IsPass idL, IsPass idR)
+ => WrapXRec (GhcPass idL) [LocatedA (StmtLR (GhcPass idL) (GhcPass idR) body)] where
+ wrapXRec = noLocI
+
+instance WrapXRec (GhcPass p) (HsType (GhcPass p)) where
wrapXRec = noLocA