cardano-api-1.30.0

Cardano.Api.HasTypeProxy

Synopsis

Documentation

class HasTypeProxy t where Source #

Associated Types

data AsType t Source #

A family of singleton types used in this API to indicate which type to use where it would otherwise be ambiguous or merely unclear.

Values of this type are passed to deserialisation functions for example.

Methods

Instances

Instances details

data Proxy (t ∷ k) Source #

Proxy is a type that holds no data, but has a phantom parameter of arbitrary type (or even kind). Its use is to provide type information, even though there is no value available of that type (or it may be too costly to create one).

Historically, Proxy :: Proxy a is a safer alternative to the undefined :: a idiom.

>>> Proxy :: Proxy (Void, Int -> Int)
Proxy


Proxy can even hold types of higher kinds,

>>> Proxy :: Proxy Either
Proxy

>>> Proxy :: Proxy Functor
Proxy

>>> Proxy :: Proxy complicatedStructure
Proxy


Constructors

 Proxy

Instances

Instances details

data FromSomeType (c ∷ TypeConstraint) b where Source #

Constructors

 FromSomeType ∷ c a ⇒ AsType a → (a → b) → FromSomeType c b