From 2b5cbccffa21d9f80f804bd9d95d4527ce3246b7 Mon Sep 17 00:00:00 2001 From: alexwl Date: Sun, 14 Oct 2018 17:15:05 +0300 Subject: Index type constructor in RoleAnnotDecl --- src/HaskellCodeExplorer/AST/RenamedSource.hs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src') 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 + } + ] -- cgit v1.2.3