Index type constructor in RoleAnnotDecl

This commit is contained in:
alexwl 2018-10-14 17:15:05 +03:00
parent c6fc26d897
commit 2b5cbccffa

View File

@ -62,6 +62,7 @@ import GHC
, TyFamEqn(..) , TyFamEqn(..)
#endif #endif
, Type , Type
, RoleAnnotDecl(..)
, unLoc , unLoc
) )
#if MIN_VERSION_GLASGOW_HASKELL(8,4,3,0) #if MIN_VERSION_GLASGOW_HASKELL(8,4,3,0)
@ -111,7 +112,8 @@ namesFromRenamedSource =
hsRecFieldExprNames `extQ` hsRecFieldExprNames `extQ`
hsRecAmbFieldExprNames `extQ` hsRecAmbFieldExprNames `extQ`
hsRecFieldPatNames `extQ` hsRecFieldPatNames `extQ`
foreignDeclNames) foreignDeclNames `extQ`
roleAnnotationNames)
#if MIN_VERSION_GLASGOW_HASKELL(8,4,3,0) #if MIN_VERSION_GLASGOW_HASKELL(8,4,3,0)
fieldOccName :: Bool -> FieldOcc GhcRn -> NameOccurrence fieldOccName :: Bool -> FieldOcc GhcRn -> NameOccurrence
@ -599,3 +601,16 @@ foreignDeclNames decl =
, isBinder = True , 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
}
]