ddc-core-0.4.1.2: Disciplined Disciple Compiler core language and type checker.

Safe HaskellSafe-Inferred

DDC.Type.Transform.Instantiate

Synopsis

Documentation

instantiateTSource

Arguments

:: Ord n 
=> Type n

Type to instantiate.

-> Type n

Argument type.

-> Maybe (Type n) 

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

instantiateTsSource

Arguments

:: Ord n 
=> Type n

Type to instantiate.

-> [Type n]

Argument types.

-> Maybe (Type n) 

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.