aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/HaskellCodeExplorer/AST/RenamedSource.hs17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/HaskellCodeExplorer/AST/RenamedSource.hs b/src/HaskellCodeExplorer/AST/RenamedSource.hs
index 592c8f7..46ecc8f 100644
--- a/src/HaskellCodeExplorer/AST/RenamedSource.hs
+++ b/src/HaskellCodeExplorer/AST/RenamedSource.hs
@@ -62,6 +62,7 @@ import GHC
, TyFamEqn(..)
#endif
, Type
+ , RoleAnnotDecl(..)
, unLoc
)
#if MIN_VERSION_GLASGOW_HASKELL(8,4,3,0)
@@ -111,7 +112,8 @@ namesFromRenamedSource =
hsRecFieldExprNames `extQ`
hsRecAmbFieldExprNames `extQ`
hsRecFieldPatNames `extQ`
- foreignDeclNames)
+ foreignDeclNames `extQ`
+ roleAnnotationNames)
#if MIN_VERSION_GLASGOW_HASKELL(8,4,3,0)
fieldOccName :: Bool -> FieldOcc GhcRn -> NameOccurrence
@@ -599,3 +601,16 @@ foreignDeclNames decl =
, isBinder = True
}
]
+
+#if MIN_VERSION_GLASGOW_HASKELL(8,4,3,0)
+roleAnnotationNames :: RoleAnnotDecl GhcRn -> [NameOccurrence]
+#else
+roleAnnotationNames :: RoleAnnotDecl Name -> [NameOccurrence]
+#endif
+roleAnnotationNames (RoleAnnotDecl n _) =
+ [ NameOccurrence
+ { locatedName = Just <$> n
+ , description = "RoleAnnotDecl"
+ , isBinder = False
+ }
+ ]