The class of objects corresponding to newtypes.
The class of objects corresponding to newtypes. Users should implement an
object that extends this class to create their own newtypes, specifying
A
as the underlying type to wrap.
object Meter extends Newtype[Double] type Meter = Meter.Type
The class of objects corresponding to newtypes with smart constructors where not all instances of the underlying type are valid instances of the newtype.
The class of objects corresponding to newtypes with smart constructors
where not all instances of the underlying type are valid instances of the
newtype. Users should implement an object that extends this class to
create their own newtypes, specifying A
as the underlying type to wrap
and an assertion that valid instances of the underlying type should
satisfy.
object Natural extends NewtypeSmart[Int](isGreaterThanEqualTo(0)) type Natural = Natural.Type
The class of objects corresponding to subtypes.
The class of objects corresponding to subtypes. Users should implement an
object that extends this class to create their own subtypes, specifying
A
as the underlying type to wrap.
object And extends Subtype[Boolean] type And = And.Type
The class of objects corresponding to subtypes with smart constructors where not all instances of the underlying type are valid instances of the subtype.
The class of objects corresponding to subtypes with smart constructors
where not all instances of the underlying type are valid instances of the
subtype. Users should implement an object that extends this class to
create their own subtypes, specifying A
as the underlying type to wrap
and an assertion that valid instances of the underlying type should
satisfy.
object Natural extends SubtypeSmart[Int](isGreaterThanEqualTo(0)) type Natural = Natural.Type