ddc-core-0.2.0.2: Disciple Core language and type checker.

Safe HaskellSafe-Infered

DDC.Type.Transform.Instantiate

Synopsis

Documentation

instantiateT :: (Ord n, Pretty n) => Type n -> Type n -> Maybe (Type n)Source

Instantiate a type with an argument. The type to be instantiated must have an outer forall, else Nothing.

instantiateTs :: (Ord n, Pretty n) => Type n -> [Type n] -> Maybe (Type n)Source

Instantiate a type with several arguments. The type to be instantiated must have at least as many outer foralls as provided type arguments, else Nothing.