The class of objects corresponding to parameterized newtypes.
The class of objects corresponding to parameterized newtypes. Users should implement an object that extends this class to create their own parameterized newtypes
object Sum extends NewtypeF type Sum[A] = Sum.Type[A]
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 ShortList extends NewtypeSmart[List](isShorterThan(5)) type ShortList = ShortList.Type
The class of objects corresponding to parameterized subtypes.
The class of objects corresponding to parameterized subtypes. Users should implement an object that extends this class to create their own parameterized subtypes
object Sum extends SubtypeF type Sum[A] = Sum.Type[A]
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 ShortList extends SubtypeSmartF[List](isShorterThan(5)) type ShortList = ShortList.Type