ouroboros-network-framework-0.1.0.1
Safe Haskell Safe-Inferred
Language Haskell2010

Ouroboros.Network.Util.ShowProxy

Synopsis

Documentation

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
Generic1 ( Proxy :: k -> Type )

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Proxy :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Proxy a -> Rep1 Proxy a Source #

to1 :: forall (a :: k0). Rep1 Proxy a -> Proxy a Source #

Monad ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Functor ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Applicative ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Foldable ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Traversable ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

MonadPlus ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Alternative ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Contravariant ( Proxy :: Type -> Type )
Instance details

Defined in Data.Functor.Contravariant

Eq1 ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool ) -> Proxy a -> Proxy b -> Bool Source #

Ord1 ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Read1 ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Show1 ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Hashable1 ( Proxy :: Type -> Type )
Instance details

Defined in Data.Hashable.Class

Bounded ( Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Enum ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Eq ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Ord ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Read ( Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Show ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Ix ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Generic ( Proxy t)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( Proxy t) :: Type -> Type Source #

Semigroup ( Proxy s)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Monoid ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Hashable ( Proxy a)
Instance details

Defined in Data.Hashable.Class

type Rep1 ( Proxy :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep1 ( Proxy :: k -> Type ) = D1 (' MetaData "Proxy" "Data.Proxy" "base" ' False ) ( C1 (' MetaCons "Proxy" ' PrefixI ' False ) ( U1 :: k -> Type ))
type Rep ( Proxy t)
Instance details

Defined in GHC.Generics

type Rep ( Proxy t) = D1 (' MetaData "Proxy" "Data.Proxy" "base" ' False ) ( C1 (' MetaCons "Proxy" ' PrefixI ' False ) ( U1 :: Type -> Type ))