FSharpPlus


FSharpPlus.TypeLevel Namespace

Type/Module Description

AggregatedBoolTypeError<'a>

AggregatedNatTypeError<'a>

BoolTypeError<'a>

BoolTypeErrorLifter

DividedByZeroError

False

IErrorLiftable<'a>

Marker interface for getting the corresponding type-level error class of a type-level literal.

ITypeBool

ITypeLiteral

Marker interface for type-level literals. #### Members static member inline Singleton (defaultValue: T) = (* unique value-level representation of T *) `Singleton` will be called with `Unchecked.defaultof` so it should not use/deconstruct its value. static member inline RuntimeValue (t: T) = (* value-level counterpart of T *) `RuntimeValue` should return value-level representation of `T`. i.e. If `T` is type-level boolean `True`, then the method should return value-level boolean `true`.

ITypeNat

NatOp

NatTypeError<'a>

NatTypeErrorLifter

OverflowError

S<'n>

True

TryWithImpl

TypeBool

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

TypeLevelOperators

TypeNat

TypeOp

Z