Safe Haskell | None |
---|---|
Language | Haskell2010 |
Functions that convert the declarations of the GHC AST to corresponding elements in the Haskell-tools AST representation
- 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 :: TransformName n r => Located (HsDecl n) -> Trf (Ann UDecl (Dom r) RangeStage)
- trfGADT :: TransformName n r => NewOrData -> Located 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 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 :: TransformName n r => Sig n -> Trf (UDecl (Dom r) RangeStage)
- trfSpecializePragma :: TransformName n r => Located 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' :: 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' :: 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' :: 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' :: TransformName n r => HsType n -> Trf (UInstanceRule (Dom r) RangeStage)
- instanceHead :: Trf (Ann UInstanceHead (Dom r) RangeStage) -> Trf (UInstanceRule (Dom r) RangeStage)
- makeInstanceRuleTyVars :: TransformName n r => Located n -> HsImplicitBndrs n [LHsType n] -> Trf (Ann UInstanceRule (Dom r) RangeStage)
- trfInstanceHead :: TransformName n r => Located (HsType n) -> Trf (Ann UInstanceHead (Dom r) RangeStage)
- trfInstanceHead' :: 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 :: TransformName n r => Located (TyFamInstEqn n) -> Trf (Ann UTypeEqn (Dom r) RangeStage)
- trfFunDeps :: TransformName n r => [Located (FunDep (Located n))] -> Trf (AnnMaybeG UFunDeps (Dom r) RangeStage)
- trfFunDep' :: TransformName n r => FunDep (Located n) -> Trf (UFunDep (Dom r) RangeStage)
- createDeclHead :: TransformName n r => Located 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 :: 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 :: 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 :: 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 :: TransformName n r => Located (FamilyResultSig n) -> Maybe (LInjectivityAnn n) -> Trf (AnnMaybeG UTypeFamilySpec (Dom r) RangeStage)
- trfAnnotationSubject :: TransformName n r => SourceText -> AnnProvenance 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 :: TransformName n r => Located (RuleBndr n) -> Trf (Ann URuleVar (Dom r) RangeStage)
- trfMinimalFormula :: TransformName n r => Located (BooleanFormula (Located n)) -> Trf (Ann UMinimalFormula (Dom r) RangeStage)
- trfMinimalFormula' :: TransformName n r => BooleanFormula (Located 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 :: TransformName n r => Located (HsDecl n) -> Trf (Ann UDecl (Dom r) RangeStage) Source #
trfGADT :: TransformName n r => NewOrData -> Located 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 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 :: TransformName n r => Sig n -> Trf (UDecl (Dom r) RangeStage) Source #
trfSpecializePragma :: TransformName n r => Located 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' :: 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' :: 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' :: 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' :: 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 :: TransformName n r => Located n -> HsImplicitBndrs 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' :: 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 :: TransformName n r => Located (TyFamInstEqn n) -> Trf (Ann UTypeEqn (Dom r) RangeStage) Source #
trfFunDeps :: TransformName n r => [Located (FunDep (Located n))] -> Trf (AnnMaybeG UFunDeps (Dom r) RangeStage) Source #
trfFunDep' :: TransformName n r => FunDep (Located n) -> Trf (UFunDep (Dom r) RangeStage) Source #
createDeclHead :: TransformName n r => Located 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 :: 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 :: 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 :: 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 :: TransformName n r => Located (FamilyResultSig n) -> Maybe (LInjectivityAnn n) -> Trf (AnnMaybeG UTypeFamilySpec (Dom r) RangeStage) Source #
trfAnnotationSubject :: TransformName n r => SourceText -> AnnProvenance 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 :: TransformName n r => Located (RuleBndr n) -> Trf (Ann URuleVar (Dom r) RangeStage) Source #
trfMinimalFormula :: TransformName n r => Located (BooleanFormula (Located n)) -> Trf (Ann UMinimalFormula (Dom r) RangeStage) Source #
trfMinimalFormula' :: TransformName n r => BooleanFormula (Located n) -> Trf (UMinimalFormula (Dom r) RangeStage) Source #