seminal-haskell-0.0.1
Safe HaskellSafe-Inferred
LanguageHaskell2010

Seminal.Change

Synopsis

Documentation

data Change node Source #

Defines a change to apply on the AST. The namings are inspired by the astRepl (Seminal, 2006, p. 5)

Constructors

Change 

Fields

Instances

Instances details
Functor Change Source # 
Instance details

Defined in Seminal.Change

Methods

fmap :: (a -> b) -> Change a -> Change b #

(<$) :: a -> Change b -> Change a #

node :: Outputable n => n -> ChangeNode n Source #

Builds ChangeNode from an AST node

data ChangeNode nodeType Source #

Sub-data, that could be either the original node, or the change

Instances

Instances details
Functor ChangeNode Source # 
Instance details

Defined in Seminal.Change

Methods

fmap :: (a -> b) -> ChangeNode a -> ChangeNode b #

(<$) :: a -> ChangeNode b -> ChangeNode a #

(<$$>) :: (a -> b) -> [Change a] -> [Change b] Source #

(<&&>) :: [Change a] -> (a -> b) -> [Change b] Source #

show :: ChangeNode node -> ChangeNode node -> ChangeLocation -> String Source #

showWithMessage :: ChangeNode node -> ChangeNode node -> ChangeLocation -> String -> String Source #

data ChangeType Source #

Categories of changes, that allow ordering them

Constructors

Wildcard

The Change basically replaces the node with a wildcard. It is not a conclusive change

Removal

A Change that consist in removing a value

Wrapping

A Change that consist of wrapping the actual value E.g. show

Terminal

The Change is good enough to terminate the search and/or be presented to the user as if

Addition 

Instances

Instances details
Data ChangeType Source # 
Instance details

Defined in Seminal.Change

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ChangeType -> c ChangeType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ChangeType #

toConstr :: ChangeType -> Constr #

dataTypeOf :: ChangeType -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ChangeType) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ChangeType) #

gmapT :: (forall b. Data b => b -> b) -> ChangeType -> ChangeType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ChangeType -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ChangeType -> r #

gmapQ :: (forall d. Data d => d -> u) -> ChangeType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ChangeType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ChangeType -> m ChangeType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ChangeType -> m ChangeType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ChangeType -> m ChangeType #

Read ChangeType Source # 
Instance details

Defined in Seminal.Change

Show ChangeType Source # 
Instance details

Defined in Seminal.Change

Eq ChangeType Source # 
Instance details

Defined in Seminal.Change

Ord ChangeType Source # 
Instance details

Defined in Seminal.Change

forceRewrite :: Outputable node => Change node -> Change node Source #