summaryrefslogtreecommitdiff
path: root/compiler/GHC/Iface
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2021-10-23 10:49:55 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-10-24 01:27:21 -0400
commit691c450f1e9cc3fd83b662be3c0134fde03e97db (patch)
treedff88e789b1af701542301d7303559b3585856e2 /compiler/GHC/Iface
parent3bab222c585343f8febe2a627d280b7be9401e92 (diff)
downloadhaskell-691c450f1e9cc3fd83b662be3c0134fde03e97db.tar.gz
EPA: Use LocatedA for ModuleName
This allows us to use an Anchor with a DeltaPos in it when exact printing.
Diffstat (limited to 'compiler/GHC/Iface')
-rw-r--r--compiler/GHC/Iface/Ext/Ast.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Iface/Ext/Ast.hs b/compiler/GHC/Iface/Ext/Ast.hs
index fbeaa8ca3a..e47c90a577 100644
--- a/compiler/GHC/Iface/Ext/Ast.hs
+++ b/compiler/GHC/Iface/Ext/Ast.hs
@@ -588,8 +588,8 @@ instance (ToHie a) => ToHie (Bag a) where
instance (ToHie a) => ToHie (Maybe a) where
toHie = maybe (pure []) toHie
-instance ToHie (IEContext (Located ModuleName)) where
- toHie (IEC c (L (RealSrcSpan span _) mname)) = do
+instance ToHie (IEContext (LocatedA ModuleName)) where
+ toHie (IEC c (L (SrcSpanAnn _ (RealSrcSpan span _)) mname)) = do
org <- ask
pure $ [Node (mkSourcedNodeInfo org $ NodeInfo S.empty [] idents) span []]
where details = mempty{identInfo = S.singleton (IEThing c)}