Safe Haskell | None |
---|---|
Language | Haskell2010 |
Functions that convert the declarations of the GHC AST to corresponding elements in the Haskell-tools AST representation
Synopsis
- trfDecls :: TransformName n r => [LHsDecl n] -> Trf (AnnListG UDecl (Dom r) RangeStage)
- trfDeclsGroup :: forall n r. TransformName n r => HsGroup n -> Trf (AnnListG UDecl (Dom r) RangeStage)
- trfDecl :: forall n r. TransformName n r => Located (HsDecl n) -> Trf (Ann UDecl (Dom r) RangeStage)
- trfGADT :: TransformName n r => NewOrData -> Located (IdP n) -> LHsQTyVars n -> Located (HsContext n) -> Maybe (Located (HsKind n)) -> [Located (ConDecl n)] -> Located [LHsDerivingClause n] -> AnnKeywordId -> Trf SrcLoc -> Trf (UDecl (Dom r) RangeStage)
- trfDataDef :: TransformName n r => NewOrData -> Located (IdP n) -> LHsQTyVars n -> Located (HsContext n) -> [Located (ConDecl n)] -> Located [LHsDerivingClause n] -> AnnKeywordId -> Trf SrcLoc -> Trf (UDecl (Dom r) RangeStage)
- trfVal :: TransformName n r => HsBindLR n n -> Trf (UDecl (Dom r) RangeStage)
- trfSig :: forall n r. TransformName n r => Sig n -> Trf (UDecl (Dom r) RangeStage)
- trfSpecializePragma :: forall n r. TransformName n r => Located (IdP n) -> [Located (HsType n)] -> Activation -> Trf (Ann USpecializePragma (Dom r) RangeStage)
- trfConDecl :: TransformName n r => Located (ConDecl n) -> Trf (Ann UConDecl (Dom r) RangeStage)
- trfConDecl' :: forall n r. TransformName n r => ConDecl n -> Trf (UConDecl (Dom r) RangeStage)
- trfConTyVars :: TransformName n r => Maybe (LHsQTyVars n) -> Trf (AnnListG UTyVar (Dom r) RangeStage)
- trfConCtx :: TransformName n r => Maybe (LHsContext n) -> Trf (AnnMaybeG UContext (Dom r) RangeStage)
- trfGADTConDecl :: TransformName n r => Located (ConDecl n) -> Trf (Ann UGadtConDecl (Dom r) RangeStage)
- trfGADTConDecl' :: forall n r. TransformName n r => ConDecl n -> Trf (UGadtConDecl (Dom r) RangeStage)
- trfGadtConType :: TransformName n r => Located (HsType n) -> Trf (Ann UGadtConType (Dom r) RangeStage)
- trfFieldDecl :: TransformName n r => Located (ConDeclField n) -> Trf (Ann UFieldDecl (Dom r) RangeStage)
- trfFieldDecl' :: forall n r. TransformName n r => ConDeclField n -> Trf (UFieldDecl (Dom r) RangeStage)
- trfDerivings :: TransformName n r => Located (HsDerivingClause n) -> Trf (Ann UDeriving (Dom r) RangeStage)
- trfDerivingStrategy :: Maybe (Located DerivStrategy) -> Trf (AnnMaybeG UDeriveStrategy (Dom r) RangeStage)
- trfInstanceRule :: TransformName n r => Located (HsType n) -> Trf (Ann UInstanceRule (Dom r) RangeStage)
- trfInstanceRule' :: forall n r. TransformName n r => HsType n -> Trf (UInstanceRule (Dom r) RangeStage)
- instanceHead :: Trf (Ann UInstanceHead (Dom r) RangeStage) -> Trf (UInstanceRule (Dom r) RangeStage)
- makeInstanceRuleTyVars :: forall n r. TransformName n r => Located (IdP n) -> [LHsType n] -> Trf (Ann UInstanceRule (Dom r) RangeStage)
- trfInstanceHead :: TransformName n r => Located (HsType n) -> Trf (Ann UInstanceHead (Dom r) RangeStage)
- trfInstanceHead' :: forall n r. TransformName n r => HsType n -> Trf (UInstanceHead (Dom r) RangeStage)
- trfTypeEqs :: TransformName n r => Maybe [Located (TyFamInstEqn n)] -> Trf (AnnListG UTypeEqn (Dom r) RangeStage)
- trfTypeEq :: forall n r. TransformName n r => Located (FamEqn n (HsTyPats n) (LHsType n)) -> Trf (Ann UTypeEqn (Dom r) RangeStage)
- trfFunDeps :: forall n r. TransformName n r => [Located (FunDep (Located (IdP n)))] -> Trf (AnnMaybeG UFunDeps (Dom r) RangeStage)
- trfFunDep' :: forall n r. TransformName n r => FunDep (Located (IdP n)) -> Trf (UFunDep (Dom r) RangeStage)
- createDeclHead :: forall n r. TransformName n r => Located (IdP n) -> LHsQTyVars n -> Trf (Ann UDeclHead (Dom r) RangeStage)
- wrapDeclHead :: TransformName n r => [LHsTyVarBndr n] -> Trf (Ann UDeclHead (Dom r) RangeStage) -> Trf (Ann UDeclHead (Dom r) RangeStage)
- addParenLocs :: SrcSpan -> Trf SrcSpan
- createClassBody :: TransformName n r => [LSig n] -> LHsBinds n -> [LFamilyDecl n] -> [LTyFamDefltEqn n] -> Trf (AnnMaybeG UClassBody (Dom r) RangeStage)
- trfClassElemSig :: forall n r. TransformName n r => Located (Sig n) -> Trf (Ann UClassElement (Dom r) RangeStage)
- trfTypeFam :: TransformName n r => Located (FamilyDecl n) -> Trf (Ann UTypeFamily (Dom r) RangeStage)
- trfTypeFam' :: TransformName n r => FamilyDecl n -> Trf (UTypeFamily (Dom r) RangeStage)
- trfTypeFamDef :: TransformName n r => Located (TyFamDefltEqn n) -> Trf (Ann UClassElement (Dom r) RangeStage)
- trfInstBody :: TransformName n r => LHsBinds n -> [LSig n] -> [LTyFamInstDecl n] -> [LDataFamInstDecl n] -> Trf (AnnMaybeG UInstBody (Dom r) RangeStage)
- trfClassInstSig :: forall n r. TransformName n r => Located (Sig n) -> Trf (Ann UInstBodyDecl (Dom r) RangeStage)
- trfInstTypeFam :: TransformName n r => Located (TyFamInstDecl n) -> Trf (Ann UInstBodyDecl (Dom r) RangeStage)
- trfInstDataFam :: forall n r. TransformName n r => Located (DataFamInstDecl n) -> Trf (Ann UInstBodyDecl (Dom r) RangeStage)
- trfPatternSynonym :: forall n r. TransformName n r => PatSynBind n n -> Trf (UPatternSynonym (Dom r) RangeStage)
- trfFamilyKind :: TransformName n r => Located (FamilyResultSig n) -> Trf (AnnMaybeG UKindConstraint (Dom r) RangeStage)
- trfFamilyResultSig :: forall n r. TransformName n r => Located (FamilyResultSig n) -> Maybe (LInjectivityAnn n) -> Trf (AnnMaybeG UTypeFamilySpec (Dom r) RangeStage)
- trfAnnotationSubject :: forall n r. TransformName n r => SourceText -> AnnProvenance (IdP n) -> SrcLoc -> Trf (Ann UAnnotationSubject (Dom r) RangeStage)
- trfDataKeyword :: NewOrData -> Trf (Ann UDataOrNewtypeKeyword (Dom r) RangeStage)
- trfCallConv :: Located CCallConv -> Trf (Ann UCallConv (Dom r) RangeStage)
- trfCallConv' :: CCallConv -> Trf (UCallConv (Dom r) RangeStage)
- trfSafety :: SrcSpan -> Located Safety -> Trf (AnnMaybeG USafety (Dom r) RangeStage)
- trfOverlap :: Located OverlapMode -> Trf (Ann UOverlapPragma (Dom r) RangeStage)
- trfRole :: Located (Maybe Role) -> Trf (Ann URole (Dom r) RangeStage)
- trfRewriteRule :: TransformName n r => Located (RuleDecl n) -> Trf (Ann URule (Dom r) RangeStage)
- trfRuleBndr :: forall n r. TransformName n r => Located (RuleBndr n) -> Trf (Ann URuleVar (Dom r) RangeStage)
- trfMinimalFormula :: forall n r. TransformName n r => Located (BooleanFormula (Located (IdP n))) -> Trf (Ann UMinimalFormula (Dom r) RangeStage)
- trfMinimalFormula' :: forall n r. TransformName n r => BooleanFormula (Located (IdP n)) -> Trf (UMinimalFormula (Dom r) RangeStage)
Documentation
trfDecls :: TransformName n r => [LHsDecl n] -> Trf (AnnListG UDecl (Dom r) RangeStage) Source #
trfDeclsGroup :: forall n r. TransformName n r => HsGroup n -> Trf (AnnListG UDecl (Dom r) RangeStage) Source #
trfDecl :: forall n r. TransformName n r => Located (HsDecl n) -> Trf (Ann UDecl (Dom r) RangeStage) Source #
trfGADT :: TransformName n r => NewOrData -> Located (IdP n) -> LHsQTyVars n -> Located (HsContext n) -> Maybe (Located (HsKind n)) -> [Located (ConDecl n)] -> Located [LHsDerivingClause n] -> AnnKeywordId -> Trf SrcLoc -> Trf (UDecl (Dom r) RangeStage) Source #
trfDataDef :: TransformName n r => NewOrData -> Located (IdP n) -> LHsQTyVars n -> Located (HsContext n) -> [Located (ConDecl n)] -> Located [LHsDerivingClause n] -> AnnKeywordId -> Trf SrcLoc -> Trf (UDecl (Dom r) RangeStage) Source #
trfVal :: TransformName n r => HsBindLR n n -> Trf (UDecl (Dom r) RangeStage) Source #
trfSig :: forall n r. TransformName n r => Sig n -> Trf (UDecl (Dom r) RangeStage) Source #
trfSpecializePragma :: forall n r. TransformName n r => Located (IdP n) -> [Located (HsType n)] -> Activation -> Trf (Ann USpecializePragma (Dom r) RangeStage) Source #
trfConDecl :: TransformName n r => Located (ConDecl n) -> Trf (Ann UConDecl (Dom r) RangeStage) Source #
trfConDecl' :: forall n r. TransformName n r => ConDecl n -> Trf (UConDecl (Dom r) RangeStage) Source #
trfConTyVars :: TransformName n r => Maybe (LHsQTyVars n) -> Trf (AnnListG UTyVar (Dom r) RangeStage) Source #
trfConCtx :: TransformName n r => Maybe (LHsContext n) -> Trf (AnnMaybeG UContext (Dom r) RangeStage) Source #
trfGADTConDecl :: TransformName n r => Located (ConDecl n) -> Trf (Ann UGadtConDecl (Dom r) RangeStage) Source #
trfGADTConDecl' :: forall n r. TransformName n r => ConDecl n -> Trf (UGadtConDecl (Dom r) RangeStage) Source #
trfGadtConType :: TransformName n r => Located (HsType n) -> Trf (Ann UGadtConType (Dom r) RangeStage) Source #
trfFieldDecl :: TransformName n r => Located (ConDeclField n) -> Trf (Ann UFieldDecl (Dom r) RangeStage) Source #
trfFieldDecl' :: forall n r. TransformName n r => ConDeclField n -> Trf (UFieldDecl (Dom r) RangeStage) Source #
trfDerivings :: TransformName n r => Located (HsDerivingClause n) -> Trf (Ann UDeriving (Dom r) RangeStage) Source #
trfDerivingStrategy :: Maybe (Located DerivStrategy) -> Trf (AnnMaybeG UDeriveStrategy (Dom r) RangeStage) Source #
trfInstanceRule :: TransformName n r => Located (HsType n) -> Trf (Ann UInstanceRule (Dom r) RangeStage) Source #
trfInstanceRule' :: forall n r. TransformName n r => HsType n -> Trf (UInstanceRule (Dom r) RangeStage) Source #
instanceHead :: Trf (Ann UInstanceHead (Dom r) RangeStage) -> Trf (UInstanceRule (Dom r) RangeStage) Source #
makeInstanceRuleTyVars :: forall n r. TransformName n r => Located (IdP n) -> [LHsType n] -> Trf (Ann UInstanceRule (Dom r) RangeStage) Source #
trfInstanceHead :: TransformName n r => Located (HsType n) -> Trf (Ann UInstanceHead (Dom r) RangeStage) Source #
trfInstanceHead' :: forall n r. TransformName n r => HsType n -> Trf (UInstanceHead (Dom r) RangeStage) Source #
trfTypeEqs :: TransformName n r => Maybe [Located (TyFamInstEqn n)] -> Trf (AnnListG UTypeEqn (Dom r) RangeStage) Source #
trfTypeEq :: forall n r. TransformName n r => Located (FamEqn n (HsTyPats n) (LHsType n)) -> Trf (Ann UTypeEqn (Dom r) RangeStage) Source #
trfFunDeps :: forall n r. TransformName n r => [Located (FunDep (Located (IdP n)))] -> Trf (AnnMaybeG UFunDeps (Dom r) RangeStage) Source #
trfFunDep' :: forall n r. TransformName n r => FunDep (Located (IdP n)) -> Trf (UFunDep (Dom r) RangeStage) Source #
createDeclHead :: forall n r. TransformName n r => Located (IdP n) -> LHsQTyVars n -> Trf (Ann UDeclHead (Dom r) RangeStage) Source #
wrapDeclHead :: TransformName n r => [LHsTyVarBndr n] -> Trf (Ann UDeclHead (Dom r) RangeStage) -> Trf (Ann UDeclHead (Dom r) RangeStage) Source #
addParenLocs :: SrcSpan -> Trf SrcSpan Source #
Get the parentheses directly before and after (for parenthesized application)
createClassBody :: TransformName n r => [LSig n] -> LHsBinds n -> [LFamilyDecl n] -> [LTyFamDefltEqn n] -> Trf (AnnMaybeG UClassBody (Dom r) RangeStage) Source #
trfClassElemSig :: forall n r. TransformName n r => Located (Sig n) -> Trf (Ann UClassElement (Dom r) RangeStage) Source #
trfTypeFam :: TransformName n r => Located (FamilyDecl n) -> Trf (Ann UTypeFamily (Dom r) RangeStage) Source #
trfTypeFam' :: TransformName n r => FamilyDecl n -> Trf (UTypeFamily (Dom r) RangeStage) Source #
trfTypeFamDef :: TransformName n r => Located (TyFamDefltEqn n) -> Trf (Ann UClassElement (Dom r) RangeStage) Source #
trfInstBody :: TransformName n r => LHsBinds n -> [LSig n] -> [LTyFamInstDecl n] -> [LDataFamInstDecl n] -> Trf (AnnMaybeG UInstBody (Dom r) RangeStage) Source #
trfClassInstSig :: forall n r. TransformName n r => Located (Sig n) -> Trf (Ann UInstBodyDecl (Dom r) RangeStage) Source #
trfInstTypeFam :: TransformName n r => Located (TyFamInstDecl n) -> Trf (Ann UInstBodyDecl (Dom r) RangeStage) Source #
trfInstDataFam :: forall n r. TransformName n r => Located (DataFamInstDecl n) -> Trf (Ann UInstBodyDecl (Dom r) RangeStage) Source #
trfPatternSynonym :: forall n r. TransformName n r => PatSynBind n n -> Trf (UPatternSynonym (Dom r) RangeStage) Source #
trfFamilyKind :: TransformName n r => Located (FamilyResultSig n) -> Trf (AnnMaybeG UKindConstraint (Dom r) RangeStage) Source #
trfFamilyResultSig :: forall n r. TransformName n r => Located (FamilyResultSig n) -> Maybe (LInjectivityAnn n) -> Trf (AnnMaybeG UTypeFamilySpec (Dom r) RangeStage) Source #
trfAnnotationSubject :: forall n r. TransformName n r => SourceText -> AnnProvenance (IdP n) -> SrcLoc -> Trf (Ann UAnnotationSubject (Dom r) RangeStage) Source #
trfDataKeyword :: NewOrData -> Trf (Ann UDataOrNewtypeKeyword (Dom r) RangeStage) Source #
trfCallConv :: Located CCallConv -> Trf (Ann UCallConv (Dom r) RangeStage) Source #
trfCallConv' :: CCallConv -> Trf (UCallConv (Dom r) RangeStage) Source #
trfOverlap :: Located OverlapMode -> Trf (Ann UOverlapPragma (Dom r) RangeStage) Source #
trfRewriteRule :: TransformName n r => Located (RuleDecl n) -> Trf (Ann URule (Dom r) RangeStage) Source #
trfRuleBndr :: forall n r. TransformName n r => Located (RuleBndr n) -> Trf (Ann URuleVar (Dom r) RangeStage) Source #
trfMinimalFormula :: forall n r. TransformName n r => Located (BooleanFormula (Located (IdP n))) -> Trf (Ann UMinimalFormula (Dom r) RangeStage) Source #
trfMinimalFormula' :: forall n r. TransformName n r => BooleanFormula (Located (IdP n)) -> Trf (UMinimalFormula (Dom r) RangeStage) Source #