| Safe Haskell | Safe-Inferred |
|---|
DDC.Core.Transform.SubstituteTX
Description
Capture avoiding substitution of types in expressions.
If a binder would capture a variable then it is anonymized to deBruijn form.
- class SubstituteTX c where
- substituteWithTX :: forall n. Ord n => Type n -> Sub n -> c n -> c n
- substituteTX :: (SubstituteTX c, Ord n) => Bind n -> Type n -> c n -> c n
- substituteTXs :: (SubstituteTX c, Ord n) => [(Bind n, Type n)] -> c n -> c n
- substituteBoundTX :: (SubstituteTX c, Ord n) => Bound n -> Type n -> c n -> c n
Documentation
class SubstituteTX c whereSource
Methods
substituteWithTX :: forall n. Ord n => Type n -> Sub n -> c n -> c nSource
Instances
| SubstituteTX Type | |
| SubstituteTX Bind | |
| SubstituteTX (Witness a) | |
| SubstituteTX (Cast a) | |
| SubstituteTX (Alt a) | |
| SubstituteTX (Exp a) |
substituteTX :: (SubstituteTX c, Ord n) => Bind n -> Type n -> c n -> c nSource
substituteTXs :: (SubstituteTX c, Ord n) => [(Bind n, Type n)] -> c n -> c nSource
Wrapper for substituteT to substitute multiple types.
substituteBoundTX :: (SubstituteTX c, Ord n) => Bound n -> Type n -> c n -> c nSource