Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Language.REST.Internal.Rewrite
Documentation
Rewrite t u s
defines a rewrite rule \( t \rightarrow u \), with
an optional name s
.
Instances
type Subst = HashMap String RuntimeTerm Source #
Subst
is a mapping from variable names to RuntimeTerm
s.
Normally this would be generated by unifying the left-hand-side of
a Rewrite
with a term.
named :: Rewrite -> String -> Rewrite Source #
named r n
assigns the name n
to rule r
, replacing any
existing name
subst :: Subst -> MetaTerm -> RuntimeTerm Source #
subst s m
replaces the variables in the MetaTerm
m
with RuntimeTerm
s
in the substitution s
. This function returns an error if any variables in m
do not have a substituion