haskell-tools-refactor-0.6.0.0: Refactoring Tool for Haskell

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.Refactor.BindingElem

Description

Utilities for transformations that work on both top-level and local definitions

Synopsis

Documentation

class NamedElement d => BindingElem d where Source #

A type class for handling definitions that can appear as both top-level and local definitions

Methods

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

Instances

BindingElem UDecl Source # 
BindingElem ULocalBind Source #