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

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.Refactor

Description

Defines the API for refactorings

Synopsis

Documentation

class HasRange a where #

Extracts or modifies the concrete range corresponding to a given source info. In case of lists and optional elements, it may not contain the elements inside.

Minimal complete definition

getRange, setRange

Methods

getRange :: a -> SrcSpan #

setRange :: SrcSpan -> a -> a #

Instances

HasRange (OptionalInfo RangeStage) 
HasRange (OptionalInfo NormRangeStage) 
HasRange (ListInfo RangeStage) 
HasRange (ListInfo NormRangeStage) 
HasRange (SpanInfo RangeStage) 
HasRange (SpanInfo NormRangeStage) 
SourceInfo stage => HasRange (AnnMaybeG elem dom stage) 

Methods

getRange :: AnnMaybeG elem dom stage -> SrcSpan #

setRange :: SrcSpan -> AnnMaybeG elem dom stage -> AnnMaybeG elem dom stage #

SourceInfo stage => HasRange (AnnListG elem dom stage) 

Methods

getRange :: AnnListG elem dom stage -> SrcSpan #

setRange :: SrcSpan -> AnnListG elem dom stage -> AnnListG elem dom stage #

SourceInfo stage => HasRange (Ann elem dom stage) 

Methods

getRange :: Ann elem dom stage -> SrcSpan #

setRange :: SrcSpan -> Ann elem dom stage -> Ann elem dom stage #

annListElems :: RefMonads w r => Reference w r (MU *) (MU *) (AnnListG elem0 dom0 stage0) (AnnListG elem0 dom0 stage0) [Ann elem0 dom0 stage0] [Ann elem0 dom0 stage0] #

annList :: (RefMonads w r, MonadPlus r, Morph Maybe r, Morph [] r) => Reference w r (MU *) (MU *) (AnnListG e d s) (AnnListG e d s) (Ann e d s) (Ann e d s) #

annJust :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r (MU *) (MU *) (AnnMaybeG e d s) (AnnMaybeG e d s) (Ann e d s) (Ann e d s) #

class (Typeable * d, Data d, (~) * (SemanticInfo' d SameInfoDefaultCls) NoSemanticInfo, Data (SemanticInfo' d SameInfoNameCls), Data (SemanticInfo' d SameInfoExprCls), Data (SemanticInfo' d SameInfoImportCls), Data (SemanticInfo' d SameInfoModuleCls), Data (SemanticInfo' d SameInfoWildcardCls), Show (SemanticInfo' d SameInfoNameCls), Show (SemanticInfo' d SameInfoExprCls), Show (SemanticInfo' d SameInfoImportCls), Show (SemanticInfo' d SameInfoModuleCls), Show (SemanticInfo' d SameInfoWildcardCls)) => Domain d #

Class for domain configuration markers

Instances

(Typeable * d, Data d, (~) * (SemanticInfo' d SameInfoDefaultCls) NoSemanticInfo, Data (SemanticInfo' d SameInfoNameCls), Data (SemanticInfo' d SameInfoExprCls), Data (SemanticInfo' d SameInfoImportCls), Data (SemanticInfo' d SameInfoModuleCls), Data (SemanticInfo' d SameInfoWildcardCls), Show (SemanticInfo' d SameInfoNameCls), Show (SemanticInfo' d SameInfoExprCls), Show (SemanticInfo' d SameInfoImportCls), Show (SemanticInfo' d SameInfoModuleCls), Show (SemanticInfo' d SameInfoWildcardCls)) => Domain d

A semantic domain for the AST. The semantic domain maps semantic information for the different types of nodes in the AST. The kind of semantic domain for an AST depends on which stages of the compilation did it pass. However after transforming the GHC representation to our AST, the domain keeps the same. The domain is not applied to the AST elements that are generated while refactoring.