/* * Copyright 2024 Magnus Madsen * * Use of this source code is governed by the Apache 2.0 license * that can be found in the LICENSE.md file. */////// Trait for types that can be coerced, and its functions.///pubmod Coerce {////// Trait for types that can be coerced.////// Currently only supports newtype-style wrappers.///pubtraitCoerce[t] {////// The return type of the coerce function.///typeOut////// 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.///typeAef: Eff = {}////// Returns the unwrapped value of `x`.///pubdefcoerce(x: t): Coerce.Out[t] \ Coerce.Aef[t] }}