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

Safe HaskellNone

DDC.Type.Transform.Instantiate

Synopsis

Documentation

instantiateTSource

Arguments

:: (Ord n, Pretty 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, Pretty 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.