Natural

zio.prelude.newtypes.`package`.Natural
object Natural extends Subtype[Int]

Attributes

Graph
Supertypes
class Subtype[Int]
class Newtype[Int]
class Object
trait Matchable
class Any
Show all
Self type
Natural.type

Members list

Type members

Inherited types

type Type <: Int

Attributes

Inherited from:
Subtype

Value members

Concrete methods

inline override def assertion: Assertion[Int]

Attributes

Definition Classes

Inherited methods

inline def apply(inline a1: Int, inline a2: Int, inline a3: Int, inline a4: Int, inline a5: Int, inline a6: Int): NonEmptyChunk[Type]

Attributes

Inherited from:
NewtypeCustom
inline def apply(inline a1: Int, inline a2: Int, inline a3: Int, inline a4: Int, inline a5: Int): NonEmptyChunk[Type]

Attributes

Inherited from:
NewtypeCustom
inline def apply(inline a1: Int, inline a2: Int, inline a3: Int, inline a4: Int): NonEmptyChunk[Type]

Attributes

Inherited from:
NewtypeCustom
inline def apply(inline a1: Int, inline a2: Int, inline a3: Int): NonEmptyChunk[Type]

Attributes

Inherited from:
NewtypeCustom
inline def apply(inline a1: Int, inline a2: Int): NonEmptyChunk[Type]

Attributes

Inherited from:
NewtypeCustom
inline def apply(inline a1: Int): Type

Converts an instance of the underlying type to an instance of the newtype.

Converts an instance of the underlying type to an instance of the newtype.

Attributes

Inherited from:
NewtypeCustom
def derive[TypeClass[_]](implicit instance: TypeClass[Int]): TypeClass[Type]

Derives an instance of a type class for the new type given an instance of the type class for the underlying type. The caller is responsible for the type class being a valid instance for the new type.

Derives an instance of a type class for the new type given an instance of the type class for the underlying type. The caller is responsible for the type class being a valid instance for the new type.

Attributes

Inherited from:
NewtypeCustom

Attributes

Inherited from:
NewtypeCustom

Attributes

Inherited from:
NewtypeCustom

Allows pattern matching on newtype instances to convert them back to instances of the underlying type.

Allows pattern matching on newtype instances to convert them back to instances of the underlying type.

Attributes

Inherited from:
NewtypeCustom
def unwrap(value: Type): Int

Converts an instance of the newtype back to an instance of the underlying type.

Converts an instance of the newtype back to an instance of the underlying type.

Attributes

Inherited from:
NewtypeCustom
def unwrapAll[F[_]](value: F[Type]): F[Int]

Converts an instance of a type parameterized on the newtype back to an instance of a type parameterized on the underlying type. For example, this could be used to convert a list of instances of the newtype back to a list of instances of the underlying type.

Converts an instance of a type parameterized on the newtype back to an instance of a type parameterized on the underlying type. For example, this could be used to convert a list of instances of the newtype back to a list of instances of the underlying type.

Attributes

Inherited from:
NewtypeCustom

Function that will used to check runtime values before lifting them into the newtype. Should be consistent with validateInline.

Function that will used to check runtime values before lifting them into the newtype. Should be consistent with validateInline.

Attributes

Inherited from:
Newtype
inline protected def validateInline(inline value: Int): Unit

Function that will be used to check compile-time values before lifting them into the newtype. Should be consistent with validate.

Function that will be used to check compile-time values before lifting them into the newtype. Should be consistent with validate.

Attributes

Inherited from:
Newtype
def wrap(value: Int): Type

Converts an instance of the underlying type to an instance of the newtype. Ignores the assertion.

Converts an instance of the underlying type to an instance of the newtype. Ignores the assertion.

Attributes

Inherited from:
NewtypeCustom
def wrapAll[F[_]](value: F[Int]): F[Type]

Converts an instance of a type parameterized on the underlying type to an instance of a type parameterized on the newtype.

Converts an instance of a type parameterized on the underlying type to an instance of a type parameterized on the newtype.

Attributes

Inherited from:
NewtypeCustom

Concrete fields

val max: Natural
val one: Natural
val zero: Natural

Implicits

Inherited implicits

implicit def classTag(implicit underlying: ClassTag[Int]): ClassTag[Type]

Attributes

Inherited from:
NewtypeCustom