ouroboros-network-testing-0.1.0.1: Common modules used for testing in ouroboros-network and ouroboros-consensus
Safe Haskell None
Language Haskell2010

Ouroboros.Network.Testing.Data.Script

Synopsis

Test scripts

newtype Script a Source #

Constructors

Script ( NonEmpty a)

Instances

Instances details
Functor Script Source #
Instance details

Defined in Ouroboros.Network.Testing.Data.Script

Foldable Script Source #
Instance details

Defined in Ouroboros.Network.Testing.Data.Script

Traversable Script Source #
Instance details

Defined in Ouroboros.Network.Testing.Data.Script

Eq a => Eq ( Script a) Source #
Instance details

Defined in Ouroboros.Network.Testing.Data.Script

Show a => Show ( Script a) Source #
Instance details

Defined in Ouroboros.Network.Testing.Data.Script

Arbitrary a => Arbitrary ( Script a) Source #
Instance details

Defined in Ouroboros.Network.Testing.Data.Script

data NonEmpty a Source #

Non-empty (and non-strict) list type.

Since: base-4.9.0.0

Constructors

a :| [a] infixr 5

Instances

Instances details
Monad NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Functor NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Applicative NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Foldable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Traversable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Eq1 NonEmpty

Since: base-4.10.0.0

Instance details

Defined in Data.Functor.Classes

Ord1 NonEmpty

Since: base-4.10.0.0

Instance details

Defined in Data.Functor.Classes

Read1 NonEmpty

Since: base-4.10.0.0

Instance details

Defined in Data.Functor.Classes

Show1 NonEmpty

Since: base-4.10.0.0

Instance details

Defined in Data.Functor.Classes

Hashable1 NonEmpty

Since: hashable-1.3.1.0

Instance details

Defined in Data.Hashable.Class

Lift a => Lift ( NonEmpty a :: Type )

Since: template-haskell-2.15.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

IsList ( NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item ( NonEmpty a) Source #

Eq a => Eq ( NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Ord a => Ord ( NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Read a => Read ( NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Read

Show a => Show ( NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Generic ( NonEmpty a)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( NonEmpty a) :: Type -> Type Source #

Semigroup ( NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Hashable a => Hashable ( NonEmpty a)
Instance details

Defined in Data.Hashable.Class

Serialise a => Serialise ( NonEmpty a)

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Generic1 NonEmpty

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 NonEmpty :: k -> Type Source #

type Rep ( NonEmpty a)
Instance details

Defined in GHC.Generics

type Item ( NonEmpty a)
Instance details

Defined in GHC.Exts

type Item ( NonEmpty a) = a
type Rep1 NonEmpty
Instance details

Defined in GHC.Generics

Timed scripts

Pick scripts

type PickScript peeraddr = Script ( PickMembers peeraddr) Source #

A pick script is used to interpret the policyPickKnownPeersForGossip and the policyPickColdPeersToForget . It selects elements from the given choices by their index (modulo the number of choices). This representation was chosen because it allows easy shrinking.

interpretPickScript :: ( MonadSTM m, Ord peeraddr) => TVar m ( PickScript peeraddr) -> Set peeraddr -> Int -> STM m ( Set peeraddr) Source #