Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Substitution
- data HoleVal
- emptySubst :: Substitution
- extendSubst :: Substitution -> FastString -> HoleVal -> Substitution
- lookupSubst :: FastString -> Substitution -> Maybe HoleVal
- deleteSubst :: Substitution -> [FastString] -> Substitution
- foldSubst :: ((FastString, HoleVal) -> a -> a) -> a -> Substitution -> a
Documentation
data Substitution Source #
A Substitution
is essentially a map from variable name to HoleVal
.
Instances
Show Substitution Source # | |
Defined in Retrie.Substitution showsPrec :: Int -> Substitution -> ShowS # show :: Substitution -> String # showList :: [Substitution] -> ShowS # |
Sum type of possible substitution values.
HoleExpr AnnotatedHsExpr | |
HolePat AnnotatedPat | |
HoleType AnnotatedHsType | |
HoleRdr RdrName | Alpha-renamed binder. |
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.