ouroboros-consensus:unstable-consensus-testlib
Safe HaskellNone
LanguageHaskell2010

Test.Util.WithEq

Synopsis

Documentation

newtype Id Source #

Constructors

Id Word 

Instances

Instances details
Eq Id Source # 
Instance details

Defined in Test.Util.WithEq

Methods

(==) ∷ Id → Id → Bool #

(/=) ∷ Id → Id → Bool #

Ord Id Source # 
Instance details

Defined in Test.Util.WithEq

Methods

compare ∷ Id → Id → Ordering #

(<) ∷ Id → Id → Bool #

(<=) ∷ Id → Id → Bool #

(>) ∷ Id → Id → Bool #

(>=) ∷ Id → Id → Bool #

max ∷ Id → Id → Id #

min ∷ Id → Id → Id #

Bounded Id Source # 
Instance details

Defined in Test.Util.WithEq

Methods

minBound ∷ Id #

maxBound ∷ Id #

Enum Id Source # 
Instance details

Defined in Test.Util.WithEq

Methods

succ ∷ Id → Id #

pred ∷ Id → Id #

toEnum ∷ Int → Id #

fromEnum ∷ Id → Int #

enumFrom ∷ Id → [Id] #

enumFromThen ∷ Id → Id → [Id] #

enumFromTo ∷ Id → Id → [Id] #

enumFromThenTo ∷ Id → Id → Id → [Id] #

Generic Id Source # 
Instance details

Defined in Test.Util.WithEq

Associated Types

type Rep Id 
Instance details

Defined in Test.Util.WithEq

type Rep Id = D1 ('MetaData "Id" "Test.Util.WithEq" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'True) (C1 ('MetaCons "Id" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))

Methods

from ∷ Id → Rep Id x #

to ∷ Rep Id x → Id #

Num Id Source # 
Instance details

Defined in Test.Util.WithEq

Methods

(+) ∷ Id → Id → Id #

(-) ∷ Id → Id → Id #

(*) ∷ Id → Id → Id #

negate ∷ Id → Id #

abs ∷ Id → Id #

signum ∷ Id → Id #

fromInteger ∷ Integer → Id #

Show Id Source # 
Instance details

Defined in Test.Util.WithEq

Methods

showsPrec ∷ Int → Id → ShowS #

show ∷ Id → String #

showList ∷ [Id] → ShowS #

type Rep Id Source # 
Instance details

Defined in Test.Util.WithEq

type Rep Id = D1 ('MetaData "Id" "Test.Util.WithEq" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'True) (C1 ('MetaCons "Id" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))

data WithEq a Source #

Use this type to add an Eq instance for types that don't have one or for which one doesn't make sense, but an Eq instance is needed for testing purposes.

E.g., Iterator needs an Eq instance in the q-s-m tests

Constructors

WithEq 

Fields

Instances

Instances details
Eq (WithEq a) Source # 
Instance details

Defined in Test.Util.WithEq

Methods

(==) ∷ WithEq a → WithEq a → Bool #

(/=) ∷ WithEq a → WithEq a → Bool #

Generic (WithEq a) Source # 
Instance details

Defined in Test.Util.WithEq

Associated Types

type Rep (WithEq a) 
Instance details

Defined in Test.Util.WithEq

type Rep (WithEq a) = D1 ('MetaData "WithEq" "Test.Util.WithEq" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "WithEq" 'PrefixI 'True) (S1 ('MetaSel ('Just "getId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Id) :*: S1 ('MetaSel ('Just "unWithEq") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

Methods

from ∷ WithEq a → Rep (WithEq a) x #

to ∷ Rep (WithEq a) x → WithEq a #

Show a ⇒ Show (WithEq a) Source # 
Instance details

Defined in Test.Util.WithEq

Methods

showsPrec ∷ Int → WithEq a → ShowS #

show ∷ WithEq a → String #

showList ∷ [WithEq a] → ShowS #

type Rep (WithEq a) Source # 
Instance details

Defined in Test.Util.WithEq

type Rep (WithEq a) = D1 ('MetaData "WithEq" "Test.Util.WithEq" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "WithEq" 'PrefixI 'True) (S1 ('MetaSel ('Just "getId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Id) :*: S1 ('MetaSel ('Just "unWithEq") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))