retrie-1.1.0.0: A powerful, easy-to-use codemodding tool for Haskell.
Safe HaskellNone
LanguageHaskell2010

Retrie.Substitution

Synopsis

Documentation

data Substitution Source #

A Substitution is essentially a map from variable name to HoleVal.

Instances

Instances details
Show Substitution Source # 
Instance details

Defined in Retrie.Substitution

data HoleVal Source #

Sum type of possible substitution values.

Instances

Instances details
Show HoleVal Source # 
Instance details

Defined in Retrie.Substitution

emptySubst :: Substitution Source #

The empty substitution.

extendSubst :: Substitution -> FastString -> HoleVal -> Substitution Source #

Extend the substitution. If the key already exists, its value is replaced.

lookupSubst :: FastString -> Substitution -> Maybe HoleVal Source #

Lookup a value in the substitution.

deleteSubst :: Substitution -> [FastString] -> Substitution Source #

Delete from the substitution.

foldSubst :: ((FastString, HoleVal) -> a -> a) -> a -> Substitution -> a Source #

Fold over the substitution.