Safe Haskell | Safe-Inferred |
---|
Capture avoiding substitution of expressions in expressions.
If a binder would capture a variable then it is anonymized to deBruijn form.
- class SubstituteXX c where
- substituteWithXX :: forall a n. Ord n => Exp a n -> Sub n -> c a n -> c a n
- substituteXX :: (Ord n, SubstituteXX c) => Bind n -> Exp a n -> c a n -> c a n
- substituteXXs :: (Ord n, SubstituteXX c) => [(Bind n, Exp a n)] -> c a n -> c a n
- substituteXArg :: (Ord n, SubstituteXX c, SubstituteWX (c a), SubstituteTX (c a)) => Bind n -> Exp a n -> c a n -> c a n
- substituteXArgs :: (Ord n, SubstituteXX c, SubstituteWX (c a), SubstituteTX (c a)) => [(Bind n, Exp a n)] -> c a n -> c a n
Documentation
class SubstituteXX c whereSource
substituteWithXX :: forall a n. Ord n => Exp a n -> Sub n -> c a n -> c a nSource
substituteXX :: (Ord n, SubstituteXX c) => Bind n -> Exp a n -> c a n -> c a nSource
Wrapper for substituteWithX
that determines the set of free names in the
expression being substituted, and starts with an empty binder stack.
substituteXXs :: (Ord n, SubstituteXX c) => [(Bind n, Exp a n)] -> c a n -> c a nSource
Wrapper for substituteX
to substitute multiple expressions.
substituteXArg :: (Ord n, SubstituteXX c, SubstituteWX (c a), SubstituteTX (c a)) => Bind n -> Exp a n -> c a n -> c a nSource
substituteXArgs :: (Ord n, SubstituteXX c, SubstituteWX (c a), SubstituteTX (c a)) => [(Bind n, Exp a n)] -> c a n -> c a nSource
Wrapper for substituteXArgs
to substitute multiple arguments.