ouroboros-network-protocols:testlib
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.Protocol.LocalStateQuery.Test

Synopsis

Documentation

newtype AnyMessageWithResult block point (query :: Type -> Type) result Source #

A newtype wrapper which captures type of response generated for all queries.

Note that this is not as general as the protocol allows, since the protocol admits different result for different queries.

Constructors

AnyMessageWithResult 

Fields

Instances

Instances details
(Arbitrary point, Arbitrary (query result), Arbitrary result) => Arbitrary (AnyMessageWithResult block point query result) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.LocalStateQuery.Test

Methods

arbitrary :: Gen (AnyMessageWithResult block point query result) #

shrink :: AnyMessageWithResult block point query result -> [AnyMessageWithResult block point query result] #

(ShowQuery query, Show point) => Show (AnyMessageWithResult block point query result) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.LocalStateQuery.Test

Methods

showsPrec :: Int -> AnyMessageWithResult block point query result -> ShowS #

show :: AnyMessageWithResult block point query result -> String #

showList :: [AnyMessageWithResult block point query result] -> ShowS #

data Query result where Source #

Constructors

GetTheLedgerState :: Query MockLedgerState

An arbitrary query that happens to be trivial to implement in this test

Orphan instances

Arbitrary AcquireFailure Source # 
Instance details

Arbitrary point => Arbitrary (Target point) Source # 
Instance details

Methods

arbitrary :: Gen (Target point) #

shrink :: Target point -> [Target point] #

Serialise point => Serialise (Target point) Source # 
Instance details

Methods

encode :: Target point -> Encoding #

decode :: Decoder s (Target point) #

encodeList :: [Target point] -> Encoding #

decodeList :: Decoder s [Target point] #