Safe Haskell | Safe-Inferred |
---|
Capture avoiding substitution of witnesses in expressions.
If a binder would capture a variable then it is anonymized to deBruijn form.
- class SubstituteWX c where
- substituteWithWX :: forall n. Ord n => Witness n -> Sub n -> c n -> c n
- substituteWX :: (Ord n, SubstituteWX c) => Bind n -> Witness n -> c n -> c n
- substituteWXs :: (Ord n, SubstituteWX c) => [(Bind n, Witness n)] -> c n -> c n
Documentation
class SubstituteWX c whereSource
substituteWithWX :: forall n. Ord n => Witness n -> Sub n -> c n -> c nSource
SubstituteWX Witness | |
SubstituteWX LetMode | |
SubstituteWX (Alt a) | |
SubstituteWX (Cast a) | |
SubstituteWX (Exp a) |
substituteWX :: (Ord n, SubstituteWX c) => Bind n -> Witness n -> c n -> c nSource
Wrapper for substituteWithWX
that determines the set of free names in the
type being substituted, and starts with an empty binder stack.
substituteWXs :: (Ord n, SubstituteWX c) => [(Bind n, Witness n)] -> c n -> c nSource
Wrapper for substituteWithWX
to substitute multiple things.