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

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.Refactor.Utils.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 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
BindingElem UDecl Source # 
Instance details

Defined in Language.Haskell.Tools.Refactor.Utils.BindingElem

BindingElem ULocalBind Source # 
Instance details

Defined in Language.Haskell.Tools.Refactor.Utils.BindingElem