haskell-tools-backend-ghc-1.1.1.0: Creating the Haskell-Tools AST from GHC's representations

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.BackendGHC.Decls

Description

Functions that convert the declarations of the GHC AST to corresponding elements in the Haskell-tools AST representation

Synopsis

Documentation

trfDeclsGroup :: forall n r p. (TransformName n r, n ~ GhcPass p, HasCallStack) => HsGroup n -> Trf (AnnListG UDecl (Dom r) RangeStage) Source #

trfDecl :: forall n r p. (TransformName n r, n ~ GhcPass p, HasCallStack) => Located (HsDecl n) -> Trf (Ann UDecl (Dom r) RangeStage) Source #

trfSig :: forall n r p. (TransformName n r, n ~ GhcPass p, HasCallStack) => Sig n -> Trf (UDecl (Dom r) RangeStage) Source #

trfConDecl' :: forall n r p. (TransformName n r, n ~ GhcPass p, HasCallStack) => ConDecl n -> Trf (UConDecl (Dom r) RangeStage) Source #

trfGADTConDecl' :: forall n r p. (TransformName n r, n ~ GhcPass p, HasCallStack) => ConDecl n -> Trf (UGadtConDecl (Dom r) RangeStage) Source #

trfFieldDecl' :: forall n r p. (TransformName n r, n ~ GhcPass p, HasCallStack) => ConDeclField n -> Trf (UFieldDecl (Dom r) RangeStage) Source #

trfInstanceRule' :: forall n r p. (TransformName n r, n ~ GhcPass p, HasCallStack) => HsType n -> Trf (UInstanceRule (Dom r) RangeStage) Source #

trfInstanceHead' :: forall n r p. (TransformName n r, n ~ GhcPass p, HasCallStack) => HsType n -> Trf (UInstanceHead (Dom r) RangeStage) Source #

trfTypeEq :: forall n r p. (TransformName n r, n ~ GhcPass p, HasCallStack) => Located (FamEqn n (HsTyPats n) (LHsType n)) -> Trf (Ann UTypeEqn (Dom r) RangeStage) Source #

trfFunDep' :: forall n r. (TransformName n r, HasCallStack) => FunDep (Located (IdP n)) -> Trf (UFunDep (Dom r) RangeStage) Source #

createDeclHead :: forall n r p. (TransformName n r, n ~ GhcPass p, HasCallStack) => Located (IdP n) -> LHsQTyVars n -> Trf (Ann UDeclHead (Dom r) RangeStage) Source #

addParenLocs :: SrcSpan -> Trf SrcSpan Source #

Get the parentheses directly before and after (for parenthesized application)

trfClassElemSig :: forall n r p. (TransformName n r, n ~ GhcPass p, HasCallStack) => Located (Sig n) -> Trf (Ann UClassElement (Dom r) RangeStage) Source #

trfClassInstSig :: forall n r p. (TransformName n r, n ~ GhcPass p, HasCallStack) => Located (Sig n) -> Trf (Ann UInstBodyDecl (Dom r) RangeStage) Source #

trfRuleBndr :: forall n r p. (TransformName n r, n ~ GhcPass p, HasCallStack) => Located (RuleBndr n) -> Trf (Ann URuleVar (Dom r) RangeStage) Source #