| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Seminal.Change
Synopsis
- data Change node = Change {
- src :: ChangeNode node
- exec :: [ChangeNode node]
- location :: ChangeLocation
- followups :: [Change node]
- message :: String
- category :: ChangeType
- node :: Outputable n => n -> ChangeNode n
- getNode :: ChangeNode n -> n
- data ChangeNode nodeType
- (<$$>) :: (a -> b) -> [Change a] -> [Change b]
- (<&&>) :: [Change a] -> (a -> b) -> [Change b]
- show :: ChangeNode node -> ChangeNode node -> ChangeLocation -> String
- showWithMessage :: ChangeNode node -> ChangeNode node -> ChangeLocation -> String -> String
- data ChangeType
- changeTypes :: [String]
- forceRewrite :: Outputable node => Change node -> Change node
Documentation
Defines a change to apply on the AST.
The namings are inspired by the astRepl (Seminal, 2006, p. 5)
Constructors
| Change | |
Fields
| |
node :: Outputable n => n -> ChangeNode n Source #
Builds ChangeNode from an AST node
getNode :: ChangeNode n -> n Source #
data ChangeNode nodeType Source #
Sub-data, that could be either the original node, or the change
Instances
| Functor ChangeNode Source # | |
Defined in Seminal.Change Methods fmap :: (a -> b) -> ChangeNode a -> ChangeNode b # (<$) :: a -> ChangeNode b -> ChangeNode a # | |
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. |
| Terminal | The Change is good enough to terminate the search and/or be presented to the user as if |
| Addition |
Instances
changeTypes :: [String] Source #
forceRewrite :: Outputable node => Change node -> Change node Source #