Safe Haskell | None |
---|---|
Language | Haskell2010 |
Retrie.Substitution
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 #
A Substitution
is essentially a map from variable name to HoleVal
.
Instances
Show Substitution # | |
Defined in Retrie.Substitution Methods showsPrec :: Int -> Substitution -> ShowS # show :: Substitution -> String # showList :: [Substitution] -> ShowS # |
Sum type of possible substitution values.
Constructors
HoleExpr AnnotatedHsExpr | |
HolePat AnnotatedPat | |
HoleType AnnotatedHsType | |
HoleRdr RdrName | Alpha-renamed binder. |
The empty substitution.
extendSubst :: Substitution -> FastString -> HoleVal -> Substitution #
Extend the substitution. If the key already exists, its value is replaced.
lookupSubst :: FastString -> Substitution -> Maybe HoleVal #
Lookup a value in the substitution.
deleteSubst :: Substitution -> [FastString] -> Substitution #
Delete from the substitution.
foldSubst :: ((FastString, HoleVal) -> a -> a) -> a -> Substitution -> a #
Fold over the substitution.