NewtypeF

zio.prelude.NewtypeFExports.NewtypeF
abstract class NewtypeF extends instance.NewtypeF

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]

Attributes

Graph
Supertypes
trait instance.NewtypeF
class Object
trait Matchable
class Any
Known subtypes
object Failure
object FailureIn
object FailureOut
object Const
object Id

Members list

Type members

Types

type Type[+A] = newtypeF.Type[A]

Value members

Concrete methods

def unwrapAll[F[_], A](value: F[newtypeF.Type[A]]): F[A]

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

def wrapAll[F[_], A](value: F[A]): F[newtypeF.Type[A]]

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

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

Attributes

Inherited methods

def apply[A](value: A): Type[A]

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:
NewtypeF
def unapply[A](value: newtypeF.Type[A]): Some[A]

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:
NewtypeF
def unwrap[A](value: newtypeF.Type[A]): A

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:
NewtypeF
def wrap[A](value: A): Type[A]

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:
NewtypeF

Concrete fields

val newtypeF: instance.NewtypeF