Safe Haskell | None |
---|---|
Language | Haskell2010 |
Utilities for transformations that work on both top-level and local definitions
Synopsis
- class NamedElement d => BindingElem d where
- getValBindInList :: BindingElem d => RealSrcSpan -> AnnList d -> Maybe ValueBind
- valBindsInList :: BindingElem d => Simple Traversal (AnnList d) ValueBind
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 IdDom SrcTemplateStage) TypeSignature Source #
Accesses a type signature definition in a local or top-level definition
valBind :: Simple Partial (Ann d IdDom SrcTemplateStage) ValueBind Source #
Accesses a value or function definition in a local or top-level definition
fixitySig :: Simple Partial (Ann d IdDom SrcTemplateStage) FixitySignature Source #
Accesses a type signature definition in a local or top-level definition
createTypeSig :: TypeSignature -> Ann d IdDom SrcTemplateStage Source #
Creates a new definition from a type signature
createBinding :: ValueBind -> Ann d IdDom SrcTemplateStage Source #
Creates a new definition from a value or function definition
createFixitySig :: FixitySignature -> Ann d IdDom SrcTemplateStage Source #
Creates a new fixity signature
isTypeSig :: Ann d IdDom SrcTemplateStage -> Bool Source #
Checks if a given definition is a type signature
isBinding :: Ann d IdDom SrcTemplateStage -> Bool Source #
Checks if a given definition is a function or value binding
isFixitySig :: Ann d IdDom SrcTemplateStage -> Bool Source #
Checks if a given definition is a fixity signature
Instances
getValBindInList :: BindingElem d => RealSrcSpan -> AnnList d -> Maybe ValueBind Source #
valBindsInList :: BindingElem d => Simple Traversal (AnnList d) ValueBind Source #