atomic-counter-0.1.2.2: Mutable counters that can be modified with atomic operatinos
Copyright(c) Sergey Vinokurov 2022
LicenseApache-2.0 (see LICENSE)
Maintainerserg.foo@gmail.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

TestUtils

Description

 

Documentation

newtype Delay Source #

Constructors

Delay 

Fields

Instances

Instances details
Arbitrary Delay Source # 
Instance details

Defined in TestUtils

Methods

arbitrary :: Gen Delay #

shrink :: Delay -> [Delay] #

Show Delay Source # 
Instance details

Defined in TestUtils

Methods

showsPrec :: Int -> Delay -> ShowS #

show :: Delay -> String #

showList :: [Delay] -> ShowS #

Eq Delay Source # 
Instance details

Defined in TestUtils

Methods

(==) :: Delay -> Delay -> Bool #

(/=) :: Delay -> Delay -> Bool #

sleep :: MonadIO m => Delay -> m () Source #

newtype Iterations Source #

Constructors

Iterations 

Fields

Instances

Instances details
Arbitrary Iterations Source # 
Instance details

Defined in TestUtils

Show Iterations Source # 
Instance details

Defined in TestUtils

Eq Iterations Source # 
Instance details

Defined in TestUtils

callN :: Applicative m => Iterations -> m a -> m () Source #

data Thread Source #

Constructors

Thread 

Instances

Instances details
Arbitrary Thread Source # 
Instance details

Defined in TestUtils

Generic Thread Source # 
Instance details

Defined in TestUtils

Associated Types

type Rep Thread :: Type -> Type #

Methods

from :: Thread -> Rep Thread x #

to :: Rep Thread x -> Thread #

Show Thread Source # 
Instance details

Defined in TestUtils

Eq Thread Source # 
Instance details

Defined in TestUtils

Methods

(==) :: Thread -> Thread -> Bool #

(/=) :: Thread -> Thread -> Bool #

type Rep Thread Source # 
Instance details

Defined in TestUtils

type Rep Thread = D1 ('MetaData "Thread" "TestUtils" "atomic-counter-0.1.2.2-6Bl71cUxp9zHJkYogM2exY-test-utils" 'False) (C1 ('MetaCons "Thread" 'PrefixI 'True) (S1 ('MetaSel ('Just "tDelay") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Delay) :*: (S1 ('MetaSel ('Just "tIncrement") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "tIterations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Iterations))))

runThread :: MonadIO m => Thread -> (Delay -> m a) -> (Int -> m b) -> m () Source #

newtype Threads Source #

Constructors

Threads 

Instances

Instances details
Arbitrary Threads Source # 
Instance details

Defined in TestUtils

Show Threads Source # 
Instance details

Defined in TestUtils

Eq Threads Source # 
Instance details

Defined in TestUtils

Methods

(==) :: Threads -> Threads -> Bool #

(/=) :: Threads -> Threads -> Bool #

spawnAndCall :: Traversable f => f b -> IO a -> (a -> b -> IO ()) -> IO a Source #