aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralexwl <alexey.a.kiryushin@gmail.com>2018-10-14 17:15:05 +0300
committeralexwl <alexey.a.kiryushin@gmail.com>2018-10-14 17:15:05 +0300
commit2b5cbccffa21d9f80f804bd9d95d4527ce3246b7 (patch)
tree05b4a368126e15b37ab525e40c6dab2c676efce8 /src
parentc6fc26d897b147d5ac48d0d799230c5a4ddb791d (diff)
Index type constructor in RoleAnnotDecl
Diffstat (limited to 'src')
-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
+ }
+ ]