flix

0.79.0

Coerce

trait Coerce[t: Type]Source

Trait for types that can be coerced.

Currently only supports newtype-style wrappers.

Associated Types

type Aef: Eff = {}Source

The associated effect of the Coerce instance.

The effect describes the effect of coercing a value of type t. It is pure (i.e. {}) for the common case of newtype-style wrappers.

type Out: TypeSource

The return type of the coerce function.

Instances

Non-primitives
Down[a], SourceLocation, SourcePosition

Signatures

def coerce(x: t): Out[t] \ Aef[t] with Coerce[t]§ Source

Returns the unwrapped value of x.