TypeError<'a>
|
Base class for type-level errors.
For every type (kind) of type-level literals, the corresponding type-error class should be created
and it should provide all the methods the literals have to offer.
TypeError should not implement `ITypeLiteral` but should provide `Singleton` and `RuntimeValue`.
This is important for making type-level error-handling work correctly.
TypeError should implement the same `IErrorLiftable` as the corresponding kind do.
For example, if `TypeFoo` implements `IErrorLiftable`, `FooTypeError` should also implement it.
So, the implementation will look like below:
type FooTypeError<'a> =
inherit TypeError<'a>
interface IErrorLiftable
(* members related to Foo *)
and AggregatedFooTypeError<'a>() =
inherit FooTypeError>()
and FooTypeErrorLifter =
static member inline Lift (_: 'Error) = Unchecked.defaultof>
type ITypeFoo =
inherit ITypeLiteral
inherit IErrorLiftable
|