ouroboros-network-api-0.7.2.0: A networking api shared with ouroboros-consensus
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Network.Util.ShowProxy

Synopsis

Documentation

class ShowProxy p where Source #

Minimal complete definition

Nothing

Methods

showProxyProxy p → String Source #

default showProxyTypeable p ⇒ Proxy p → String Source #

Instances

Instances details
ShowProxy SlotNo Source # 
Instance details

Defined in Ouroboros.Network.Util.ShowProxy

ShowProxy Int Source # 
Instance details

Defined in Ouroboros.Network.Util.ShowProxy

Methods

showProxyProxy IntString Source #

ShowProxy block ⇒ ShowProxy (Point block ∷ Type) Source # 
Instance details

Defined in Ouroboros.Network.Block

Methods

showProxyProxy (Point block) → String Source #

ShowProxy a ⇒ ShowProxy (Serialised a ∷ Type) Source # 
Instance details

Defined in Ouroboros.Network.Block

ShowProxy b ⇒ ShowProxy (Tip b ∷ Type) Source # 
Instance details

Defined in Ouroboros.Network.Block

Methods

showProxyProxy (Tip b) → String Source #

data Proxy (t ∷ k) #

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) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Proxy ∷ k → Type #

Methods

from1 ∷ ∀ (a ∷ k0). Proxy a → Rep1 Proxy a #

to1 ∷ ∀ (a ∷ k0). Rep1 Proxy a → Proxy a #

FromJSON1 (ProxyTypeType) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSONMaybe a → (ValueParser a) → (ValueParser [a]) → ValueParser (Proxy a) Source #

liftParseJSONListMaybe a → (ValueParser a) → (ValueParser [a]) → ValueParser [Proxy a] Source #

liftOmittedFieldMaybe a → Maybe (Proxy a) Source #

ToJSON1 (ProxyTypeType) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON ∷ (a → Bool) → (a → Value) → ([a] → Value) → Proxy a → Value Source #

liftToJSONList ∷ (a → Bool) → (a → Value) → ([a] → Value) → [Proxy a] → Value Source #

liftToEncoding ∷ (a → Bool) → (a → Encoding) → ([a] → Encoding) → Proxy a → Encoding Source #

liftToEncodingList ∷ (a → Bool) → (a → Encoding) → ([a] → Encoding) → [Proxy a] → Encoding Source #

liftOmitField ∷ (a → Bool) → Proxy a → Bool Source #

Foldable (ProxyTypeType)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

foldMonoid m ⇒ Proxy m → m #

foldMapMonoid m ⇒ (a → m) → Proxy a → m #

foldMap'Monoid m ⇒ (a → m) → Proxy a → m #

foldr ∷ (a → b → b) → b → Proxy a → b #

foldr' ∷ (a → b → b) → b → Proxy a → b #

foldl ∷ (b → a → b) → b → Proxy a → b #

foldl' ∷ (b → a → b) → b → Proxy a → b #

foldr1 ∷ (a → a → a) → Proxy a → a #

foldl1 ∷ (a → a → a) → Proxy a → a #

toListProxy a → [a] #

nullProxy a → Bool #

lengthProxy a → Int #

elemEq a ⇒ a → Proxy a → Bool #

maximumOrd a ⇒ Proxy a → a #

minimumOrd a ⇒ Proxy a → a #

sumNum a ⇒ Proxy a → a #

productNum a ⇒ Proxy a → a #

Traversable (ProxyTypeType)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverseApplicative f ⇒ (a → f b) → Proxy a → f (Proxy b) #

sequenceAApplicative f ⇒ Proxy (f a) → f (Proxy a) #

mapMMonad m ⇒ (a → m b) → Proxy a → m (Proxy b) #

sequenceMonad m ⇒ Proxy (m a) → m (Proxy a) #

Alternative (ProxyTypeType)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

emptyProxy a #

(<|>)Proxy a → Proxy a → Proxy a #

someProxy a → Proxy [a] #

manyProxy a → Proxy [a] #

Applicative (ProxyTypeType)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

pure ∷ a → Proxy a #

(<*>)Proxy (a → b) → Proxy a → Proxy b #

liftA2 ∷ (a → b → c) → Proxy a → Proxy b → Proxy c #

(*>)Proxy a → Proxy b → Proxy b #

(<*)Proxy a → Proxy b → Proxy a #

Functor (ProxyTypeType)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

fmap ∷ (a → b) → Proxy a → Proxy b #

(<$) ∷ a → Proxy b → Proxy a #

Monad (ProxyTypeType)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

(>>=)Proxy a → (a → Proxy b) → Proxy b #

(>>)Proxy a → Proxy b → Proxy b #

return ∷ a → Proxy a #

MonadPlus (ProxyTypeType)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

mzeroProxy a #

mplusProxy a → Proxy a → Proxy a #

NFData1 (ProxyTypeType)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf ∷ (a → ()) → Proxy a → () #

Hashable1 (ProxyTypeType) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt ∷ (Int → a → Int) → IntProxy a → Int Source #

FromJSON (Proxy a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON (Proxy a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Monoid (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

memptyProxy s #

mappendProxy s → Proxy s → Proxy s #

mconcat ∷ [Proxy s] → Proxy s #

Semigroup (Proxy s)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

(<>)Proxy s → Proxy s → Proxy s #

sconcatNonEmpty (Proxy s) → Proxy s #

stimesIntegral b ⇒ b → Proxy s → Proxy s #

Bounded (Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

minBoundProxy t #

maxBoundProxy t #

Enum (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

succProxy s → Proxy s #

predProxy s → Proxy s #

toEnumIntProxy s #

fromEnumProxy s → Int #

enumFromProxy s → [Proxy s] #

enumFromThenProxy s → Proxy s → [Proxy s] #

enumFromToProxy s → Proxy s → [Proxy s] #

enumFromThenToProxy s → Proxy s → Proxy s → [Proxy s] #

Generic (Proxy t) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Proxy t) ∷ TypeType #

Methods

fromProxy t → Rep (Proxy t) x #

toRep (Proxy t) x → Proxy t #

Ix (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

range ∷ (Proxy s, Proxy s) → [Proxy s] #

index ∷ (Proxy s, Proxy s) → Proxy s → Int #

unsafeIndex ∷ (Proxy s, Proxy s) → Proxy s → Int #

inRange ∷ (Proxy s, Proxy s) → Proxy s → Bool #

rangeSize ∷ (Proxy s, Proxy s) → Int #

unsafeRangeSize ∷ (Proxy s, Proxy s) → Int #

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

Methods

showsPrecIntProxy s → ShowS #

showProxy s → String #

showList ∷ [Proxy s] → ShowS #

NFData (Proxy a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnfProxy a → () #

Eq (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

(==)Proxy s → Proxy s → Bool #

(/=)Proxy s → Proxy s → Bool #

Ord (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

compareProxy s → Proxy s → Ordering #

(<)Proxy s → Proxy s → Bool #

(<=)Proxy s → Proxy s → Bool #

(>)Proxy s → Proxy s → Bool #

(>=)Proxy s → Proxy s → Bool #

maxProxy s → Proxy s → Proxy s #

minProxy s → Proxy s → Proxy s #

Hashable (Proxy a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSaltIntProxy a → Int Source #

hashProxy a → Int Source #

Serialise (Proxy a)

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

type Rep1 (Proxy ∷ k → Type)

Since: base-4.6.0.0

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)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep (Proxy t) = D1 ('MetaData "Proxy" "Data.Proxy" "base" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) (U1TypeType))