AERN-Net-0.2.0: Compositional lazy dataflow networks for exact real number computationSource codeContentsIndex
Control.ERNet.Foundations.Protocol
Portabilityportable
Stabilityexperimental
Maintainermik@konecny.aow.cz
Description

This module defines the concept of a protocol for channel communication.

The protocol concept is formalised using the 2-parameter class QAProtocol and the existential types ChannelType, AnswerAnyProt, QueryAnyProt indexed by instances of QAProtocol.

Synopsis
type QueryId = Int
class (Ord q, HTML q, HTML a, Show q, Show a, Typeable q, Typeable a) => QAProtocol q a | a -> q, q -> a where
qaMatch :: q -> a -> Maybe String
qaaSetMinGran :: Granularity -> a -> a
data ChannelType = forall q a . (QAProtocol q a, Eq q, Show q, Eq a, Show a) => ChannelType q a
data QueryAnyProt = forall q a . (QAProtocol q a, Show q, Show a) => QueryAnyProt q
data AnswerAnyProt = forall q a . (QAProtocol q a, Show q, Show a) => AnswerAnyProt a
data QAUnitQ = QAUnitQ
data QAUnitA = QAUnitA
data QABoolQ = QABoolQ
Documentation
type QueryId = IntSource
any danger of over 2^29 queries?
class (Ord q, HTML q, HTML a, Show q, Show a, Typeable q, Typeable a) => QAProtocol q a | a -> q, q -> a whereSource

A class grouping types of queries and answers.

Each instance has to define dynamic type checking of answers agains queries.

Methods
qaMatchSource
:: q
-> a
-> Maybe Stringerror message
test whether the answer makes sense for a given query (dynamic type checking)
qaaSetMinGran :: Granularity -> a -> aSource
show/hide Instances
QAProtocol QABoolQ Bool
QAProtocol QABoolQ Bool
QAProtocol QAUnitQ QAUnitA
QAProtocol QAUnitQ QAUnitA
(ERApproxElementary ira, Typeable ira) => QAProtocol QARealQ (QARealA ira)
(ERApproxElementary ira, Typeable ira) => QAProtocol QARealQ (QARealA ira)
(QAProtocol q a, Show q, Show a) => QAProtocol (QAListQ q) (QAListA a)
(QAProtocol q a, Show q, Show a) => QAProtocol (QAListQ q) (QAListA a)
(QAProtocol q a, Show q, Show a) => QAProtocol (QAChangesQ q) (QAChangesA a)
(QAProtocol q a, Show q, Show a) => QAProtocol (QAChangesQ q) (QAChangesA a)
QAProtocol q a => QAProtocol (QAIxQ q) (QAIxA a)
QAProtocol q a => QAProtocol (QAIxQ q) (QAIxA a)
(QAProtocol q a, Show q, Show a) => QAProtocol (QAMaybeQ q) (QAMaybeA a)
(QAProtocol q a, Show q, Show a) => QAProtocol (QAMaybeQ q) (QAMaybeA a)
(ERFnApprox box varid domra ranra fa, Typeable fa, HTML fa) => QAProtocol (QAFn2Q fa) (QAFn2A fa)
(ERFnApprox box varid domra ranra fa, Typeable fa, HTML fa) => QAProtocol (QAFn2Q fa) (QAFn2A fa)
(ERFnApprox box varid domra ranra fa, ERApproxElementary domra, ERApproxElementary ranra, Typeable box, Show box, Typeable domra, Typeable ranra, Typeable fa, HTML fa) => QAProtocol (QAFn1Q box) (QAFn1A ranra fa)
(ERFnApprox box varid domra ranra fa, ERApproxElementary domra, ERApproxElementary ranra, Typeable box, Show box, Typeable domra, Typeable ranra, Typeable fa, HTML fa) => QAProtocol (QAFn1Q box) (QAFn1A ranra fa)
(QAProtocol q1 a1, QAProtocol q2 a2, Show q1, Show a1, Show q2, Show a2) => QAProtocol (QAProdQ q1 q2) (QAProdA a1 a2)
(QAProtocol q1 a1, QAProtocol q2 a2, Show q1, Show a1, Show q2, Show a2) => QAProtocol (QAProdQ q1 q2) (QAProdA a1 a2)
data ChannelType Source
This type is used to identify protocols eg for the creation of new channels or for dynamic type checking. It consists of an example query and an example answer.
Constructors
forall q a . (QAProtocol q a, Eq q, Show q, Eq a, Show a) => ChannelType q a
show/hide Instances
data QueryAnyProt Source
Union of queries from all protocols.
Constructors
forall q a . (QAProtocol q a, Show q, Show a) => QueryAnyProt q
show/hide Instances
data AnswerAnyProt Source
Union of answers from all protocols.
Constructors
forall q a . (QAProtocol q a, Show q, Show a) => AnswerAnyProt a
show/hide Instances
data QAUnitQ Source
Constructors
QAUnitQ
show/hide Instances
data QAUnitA Source
Constructors
QAUnitA
show/hide Instances
data QABoolQ Source
Constructors
QABoolQ
show/hide Instances
Produced by Haddock version 2.4.2