Safe Haskell | None |
---|---|
Language | Haskell2010 |
Utilities for transformations that work on both top-level and local definitions
- class NamedElement d => BindingElem d where
- getValBindInList :: BindingElem d => RealSrcSpan -> AnnListG d dom SrcTemplateStage -> Maybe (ValueBind dom)
- valBindsInList :: BindingElem d => Simple Traversal (AnnListG d dom SrcTemplateStage) (ValueBind dom)
Documentation
class NamedElement d => BindingElem d where Source #
A type class for handling definitions that can appear as both top-level and local definitions
sigBind, valBind, fixitySig, createTypeSig, createBinding, createFixitySig, isTypeSig, isBinding, isFixitySig
sigBind :: Simple Partial (Ann d dom SrcTemplateStage) (TypeSignature dom) Source #
Accesses a type signature definition in a local or top-level definition
valBind :: Simple Partial (Ann d dom SrcTemplateStage) (ValueBind dom) Source #
Accesses a value or function definition in a local or top-level definition
fixitySig :: Simple Partial (Ann d dom SrcTemplateStage) (FixitySignature dom) Source #
Accesses a type signature definition in a local or top-level definition
createTypeSig :: TypeSignature dom -> Ann d dom SrcTemplateStage Source #
Creates a new definition from a type signature
createBinding :: ValueBind dom -> Ann d dom SrcTemplateStage Source #
Creates a new definition from a value or function definition
createFixitySig :: FixitySignature dom -> Ann d dom SrcTemplateStage Source #
Creates a new fixity signature
isTypeSig :: Ann d dom SrcTemplateStage -> Bool Source #
Checks if a given definition is a type signature
isBinding :: Ann d dom SrcTemplateStage -> Bool Source #
Checks if a given definition is a function or value binding
isFixitySig :: Ann d dom SrcTemplateStage -> Bool Source #
Checks if a given definition is a fixity signature
getValBindInList :: BindingElem d => RealSrcSpan -> AnnListG d dom SrcTemplateStage -> Maybe (ValueBind dom) Source #
valBindsInList :: BindingElem d => Simple Traversal (AnnListG d dom SrcTemplateStage) (ValueBind dom) Source #