Repository navigation
v1.1.0
mat v1.1.0
This release simplifies custom materialization by unifying it around the Materialize[A] API.
Highlights
- Explicit materialization is now provided through
Materialize.fromValue. - Explicit
Materialize[A]evidence takes precedence over built-in derivation at every level, including nested products, tuples, intersections and sums. - Precise output types remain available through
Materialize.Aux[A, O]. - Documentation now includes the explicit materialization API and migration guidance.
- Compile-time benchmark execution has been streamlined.
Breaking changes
- Removed the redundant
CustomMaterialize[A]API.
Migration
Replace custom materialization:
given CustomMaterialize[SomeType]:
type Out = SomeType
def apply(): SomeType = valuewith:
given Materialize[SomeType] =
Materialize.fromValue(value)For a more precise output type:
given Materialize.Aux[Int, 5] =
Materialize.fromValue[Int, 5](5)Materialize.fromValue accepts its argument by name, so the expression is evaluated each time the materialized evidence is applied.