quickcheck-state-machine-0.2.0: Test monadic programs using state machine based models

Copyright(C) 2017 ATS Advanced Telematic Systems GmbH
LicenseBSD-style (see the file LICENSE)
MaintainerStevan Andjelkovic <stevan@advancedtelematic.com>
Stabilityprovisional
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Test.StateMachine.Internal.Types

Description

This module exports some types that are used internally by the library.

Synopsis

Documentation

newtype Program act Source #

A (sequential) program is an abstract datatype representing a list of actions.

The idea is that the user shows how to generate, shrink, execute and modelcheck individual actions, and then the below combinators lift those things to whole programs.

Constructors

Program 

Fields

Instances

Eq (Internal act) => Eq (Program act) Source # 

Methods

(==) :: Program act -> Program act -> Bool #

(/=) :: Program act -> Program act -> Bool #

Read (Untyped act) => Read (Program act) Source # 
Show (Untyped act) => Show (Program act) Source # 

Methods

showsPrec :: Int -> Program act -> ShowS #

show :: Program act -> String #

showList :: [Program act] -> ShowS #

Monoid (Program act) Source # 

Methods

mempty :: Program act #

mappend :: Program act -> Program act -> Program act #

mconcat :: [Program act] -> Program act #

programLength :: Program act -> Int Source #

Returns the number of actions in a program.

newtype ParallelProgram act Source #

A parallel program is an abstract datatype that represents three sequences of actions; a sequential prefix and two parallel suffixes. Analogous to the sequential case, the user shows how to generate, shrink, execute and modelcheck individual actions, and then the below combinators lift those things to whole parallel programs.

Constructors

ParallelProgram 

Fields

newtype Pid Source #

A process id.

Constructors

Pid Int 

Instances

Eq Pid Source # 

Methods

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

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

Show Pid Source # 

Methods

showsPrec :: Int -> Pid -> ShowS #

show :: Pid -> String #

showList :: [Pid] -> ShowS #

data Fork a Source #

Forks are used to represent parallel programs.

Constructors

Fork a a a 

Instances

Functor Fork Source # 

Methods

fmap :: (a -> b) -> Fork a -> Fork b #

(<$) :: a -> Fork b -> Fork a #

Eq a => Eq (Fork a) Source # 

Methods

(==) :: Fork a -> Fork a -> Bool #

(/=) :: Fork a -> Fork a -> Bool #

Ord a => Ord (Fork a) Source # 

Methods

compare :: Fork a -> Fork a -> Ordering #

(<) :: Fork a -> Fork a -> Bool #

(<=) :: Fork a -> Fork a -> Bool #

(>) :: Fork a -> Fork a -> Bool #

(>=) :: Fork a -> Fork a -> Bool #

max :: Fork a -> Fork a -> Fork a #

min :: Fork a -> Fork a -> Fork a #

Read a => Read (Fork a) Source # 
Show a => Show (Fork a) Source # 

Methods

showsPrec :: Int -> Fork a -> ShowS #

show :: Fork a -> String #

showList :: [Fork a] -> ShowS #

data Internal act where Source #

An internal action is an action together with the symbolic variable that will hold its result.

Constructors

Internal :: (Show resp, Typeable resp) => act Symbolic resp -> Symbolic resp -> Internal act 

Instances

Eq (Untyped act) => Eq (Internal act) Source # 

Methods

(==) :: Internal act -> Internal act -> Bool #

(/=) :: Internal act -> Internal act -> Bool #

Read (Untyped act) => Read (Internal act) Source # 
Show (Untyped act) => Show (Internal act) Source # 

Methods

showsPrec :: Int -> Internal act -> ShowS #

show :: Internal act -> String #

showList :: [Internal act] -> ShowS #