AERN-Net-0.2.1.1: Compositional lazy dataflow networks for exact real number computation

Portabilityportable
Stabilityexperimental
Maintainermik@konecny.aow.cz

Control.ERNet.Foundations.Protocol.StandardCombinators

Description

This module defines some basic concrete protocols, namely protocols for transferring a unit and a boolean.

Some protocol combinators are provided to form new protocols from old protocols. Eg one can form a product of two protocols to get a protocol for query-answer dialogues about a pair of values. Similarly, one can construct protocols for a sum of two types, a maybe type and a list type.

Any protocol can be also extended to include effort indices in queries or to allow incremental computation with non-blocking queries on progress, multiple dialogue thread tracking and the communication of a failure.

TODO: add protocols for

  • game-theoretic HO functions

Documentation

data QAMaybeQ q Source

Constructors

QAMaybeQ q 
QAMaybeQIsNothing q 

Instances

Typeable1 QAMaybeQ 
Eq q => Eq (QAMaybeQ q) 
Ord q => Ord (QAMaybeQ q) 
Show q => Show (QAMaybeQ q) 
HTML q => HTML (QAMaybeQ q) 
(QAProtocol q a, Show q, Show a) => QAProtocol (QAMaybeQ q) (QAMaybeA a) 

data QAMaybeA a Source

Instances

Typeable1 QAMaybeA 
Eq a => Eq (QAMaybeA a) 
Ord a => Ord (QAMaybeA a) 
Show a => Show (QAMaybeA a) 
HTML a => HTML (QAMaybeA a) 
(QAProtocol q a, Show q, Show a) => QAProtocol (QAMaybeQ q) (QAMaybeA a) 

data QAIxQ q Source

Constructors

QAIxQ EffortIndex q 

Instances

Typeable1 QAIxQ 
Eq q => Eq (QAIxQ q) 
Ord q => Ord (QAIxQ q) 
Show q => Show (QAIxQ q) 
HTML q => HTML (QAIxQ q) 
QAProtocol q a => QAProtocol (QAIxQ q) (QAIxA a) 

data QAIxA a Source

Constructors

QAIxA a 

Instances

Typeable1 QAIxA 
Eq a => Eq (QAIxA a) 
Ord a => Ord (QAIxA a) 
Show a => Show (QAIxA a) 
HTML a => HTML (QAIxA a) 
QAProtocol q a => QAProtocol (QAIxQ q) (QAIxA a) 

firstJust :: [Maybe err] -> Maybe errSource

data QAListQ q Source

Instances

Typeable1 QAListQ 
Eq q => Eq (QAListQ q) 
Ord q => Ord (QAListQ q) 
Show q => Show (QAListQ q) 
HTML q => HTML (QAListQ q) 
(QAProtocol q a, Show q, Show a) => QAProtocol (QAListQ q) (QAListA a) 

data QAListA a Source

Constructors

QAListA [a] 
QAListASingle a 
QAListALength Int 

Instances

Typeable1 QAListA 
Eq a => Eq (QAListA a) 
Ord a => Ord (QAListA a) 
Show a => Show (QAListA a) 
HTML a => HTML (QAListA a) 
(QAProtocol q a, Show q, Show a) => QAProtocol (QAListQ q) (QAListA a) 

data QAProdQ q1 q2 Source

Constructors

QAProdQFirst q1 
QAProdQSecond q2 
QAProdQBoth q1 q2 

Instances

Typeable2 QAProdQ 
(Eq q1, Eq q2) => Eq (QAProdQ q1 q2) 
(Ord q1, Ord q2) => Ord (QAProdQ q1 q2) 
(Show q1, Show q2) => Show (QAProdQ q1 q2) 
(HTML q1, HTML q2) => HTML (QAProdQ q1 q2) 
(QAProtocol q1 a1, QAProtocol q2 a2, Show q1, Show a1, Show q2, Show a2) => QAProtocol (QAProdQ q1 q2) (QAProdA a1 a2) 

data QAProdA a1 a2 Source

Constructors

QAProdAFirst a1 
QAProdASecond a2 
QAProdABoth a1 a2 

Instances

Typeable2 QAProdA 
(Eq a1, Eq a2) => Eq (QAProdA a1 a2) 
(Ord a1, Ord a2) => Ord (QAProdA a1 a2) 
(Show a1, Show a2) => Show (QAProdA a1 a2) 
(HTML a1, HTML a2) => HTML (QAProdA a1 a2) 
(QAProtocol q1 a1, QAProtocol q2 a2, Show q1, Show a1, Show q2, Show a2) => QAProtocol (QAProdQ q1 q2) (QAProdA a1 a2) 

makeAnswerProd :: (QAProtocol q1 a1, QAProtocol q2 a2) => (q1 -> a1) -> (q2 -> a2) -> QAProdQ q1 q2 -> QAProdA a1 a2Source