|
| Control.ERNet.Foundations.Protocol | | Portability | portable | | Stability | experimental | | Maintainer | mik@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 | | | | 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 |
|
|
| any danger of over 2^29 queries?
|
|
|
A class grouping types of queries and answers.
Each instance has to define dynamic type checking of answers agains queries.
| | | Methods | | | :: q | | | -> a | | | -> Maybe String | error message
| | test whether the answer makes sense for a given query (dynamic type checking)
|
| | |
| | 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) |
|
|
|
|
| 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 | | Instances | |
|
|
|
| Union of queries from all protocols.
| | Constructors | | Instances | |
|
|
|
| Union of answers from all protocols.
| | Constructors | | Instances | |
|
|
|
| Constructors | | Instances | |
|
|
|
| Constructors | | Instances | |
|
|
|
| Constructors | | Instances | |
|
|
| Produced by Haddock version 2.4.2 |