Safe Haskell | None |
---|
This module represents the abstract syntax tree of machine CSP.
Most of the datatypes are parameterised over the type of variables that they
contain. Before renaming (by Renamer
) the variables are of type
UnRenamedName
, wheras after renaming they are of type Name
(and are
hence associated with their bindings instances). Furthermore, nearly all
pieces of syntax are annoated with their location in the source code, and
(sometimes) with their type (but only after type checking). This is done
using the Annotated
datatype.
- data CSPMFile id = CSPMFile [AnDecl id]
- allAssertionsInFile :: AnCSPMFile a -> [AnAssertion a]
- allPrintStatementsInFile :: AnCSPMFile a -> [Located String]
- data Decl id
- = FunBind id [AnMatch id] (Maybe (AnSTypeScheme id))
- | PatBind (AnPat id) (AnExp id) (Maybe (AnSTypeScheme id))
- | Assert (AnAssertion id)
- | External {
- externalImportedNames :: [id]
- | Transparent {
- transparentImportedNames :: [id]
- | Channel [id] (Maybe (AnExp id))
- | DataType id [AnDataTypeClause id]
- | SubType id [AnDataTypeClause id]
- | NameType id (AnExp id)
- | Module {
- moduleName :: id
- moduleArguments :: [AnPat id]
- modulePrivateDeclarations :: [AnDecl id]
- moduleExportedDeclarations :: [AnDecl id]
- | TimedSection {
- timedSectionTockName :: Maybe Name
- timedSectionFunction :: Maybe (AnExp id)
- timedSectionContents :: [AnDecl id]
- | ParsedTypeAnnotation [id] (AnSTypeScheme id)
- | ModuleInstance {
- moduleInstanceName :: id
- moduleInstanceOf :: id
- moduleInstanceOfArguments :: [AnExp id]
- moduleInstanceNameMap :: [(id, id)]
- moduleInstanceOfDeclaration :: Maybe (AnDecl id)
- | PrintStatement { }
- data Match id = Match {
- matchPatterns :: [[AnPat id]]
- matchRightHandSide :: AnExp id
- data Assertion id
- = Refinement { }
- | PropertyCheck { }
- | ASNot (AnAssertion id)
- data Model
- data ModelOption id = TauPriority (AnExp id)
- data SemanticProperty
- data DataTypeClause id = DataTypeClause {
- dataTypeClauseName :: id
- dataTypeClauseTypeExpression :: Maybe (AnExp id)
- data Exp id
- = App {
- appFunction :: AnExp id
- appArguments :: [AnExp id]
- | BooleanBinaryOp { }
- | BooleanUnaryOp { }
- | Concat {
- concatLeftList :: AnExp id
- concatRightList :: AnExp id
- | DotApp {
- dotAppLeftArgument :: AnExp id
- dotAppRighArgument :: AnExp id
- | If {
- ifCondition :: AnExp id
- ifThenBranch :: AnExp id
- ifElseBranch :: AnExp id
- | Lambda {
- lambdaBindingPatterns :: [AnPat id]
- lambdaRightHandSide :: AnExp id
- | Let {
- letDeclarations :: [AnDecl id]
- letExpression :: AnExp id
- | Lit { }
- | List { }
- | ListComp {
- listCompItems :: [AnExp id]
- listCompStatements :: [AnStmt id]
- | ListEnumFrom {
- listEnumFromLowerBound :: AnExp id
- | ListEnumFromTo { }
- | ListEnumFromComp {
- listEnumFromCompLowerBound :: AnExp id
- listEnumFromCompStatements :: [AnStmt id]
- | ListEnumFromToComp { }
- | ListLength {
- listLengthExpression :: AnExp id
- | Map {
- mapKeyValuePairs :: [(AnExp id, AnExp id)]
- | MathsBinaryOp { }
- | MathsUnaryOp { }
- | Paren {
- parenExpression :: AnExp id
- | Set { }
- | SetComp {
- setCompItems :: [AnExp id]
- setCompStatements :: [AnStmt id]
- | SetEnum {
- setEnumItems :: [AnExp id]
- | SetEnumComp {
- setEnumCompItems :: [AnExp id]
- setEnumCompStatements :: [AnStmt id]
- | SetEnumFrom {
- setEnumFromLowerBound :: AnExp id
- | SetEnumFromTo {
- setEnumFromToLowerBound :: AnExp id
- setEnumFromToUpperBound :: AnExp id
- | SetEnumFromComp {
- setEnumFromCompLowerBound :: AnExp id
- setEnumFromCompStatements :: [AnStmt id]
- | SetEnumFromToComp { }
- | Tuple {
- tupleItems :: [AnExp id]
- | Var {
- varIdentity :: id
- | AlphaParallel { }
- | Exception {
- exceptionLeftProcess :: AnExp id
- exceptionAlphabet :: AnExp id
- exceptionRightProcess :: AnExp id
- | ExternalChoice {
- extChoiceLeftProcess :: AnExp id
- extChoiceRightOperator :: AnExp id
- | GenParallel {
- genParallelLeftProcess :: AnExp id
- genParallelAlphabet :: AnExp id
- genParallelRightProcess :: AnExp id
- | GuardedExp {
- guardedExpCondition :: AnExp id
- guardedExpProcess :: AnExp id
- | Hiding {
- hidingProcess :: AnExp id
- hidingAlphabet :: AnExp id
- | InternalChoice {
- intChoiceLeftProcess :: AnExp id
- intChoiceRightProcess :: AnExp id
- | Interrupt {
- interruptLeftProcess :: AnExp id
- interruptRightProcess :: AnExp id
- | Interleave {
- interleaveLeftProcess :: AnExp id
- interleaveRightProcess :: AnExp id
- | LinkParallel {
- linkParLeftProcess :: AnExp id
- linkParTiedEvents :: [(AnExp id, AnExp id)]
- linkParTieStatements :: [AnStmt id]
- linkParRightProcess :: AnExp id
- | Prefix {
- prefixChannel :: AnExp id
- prefixFields :: [AnField id]
- prefixProcess :: AnExp id
- | Rename {
- renameProcess :: AnExp id
- renameTiedEvents :: [(AnExp id, AnExp id)]
- renameTieStatements :: [AnStmt id]
- | SequentialComp {
- seqCompLeftProcess :: AnExp id
- seqCompRightProcess :: AnExp id
- | SlidingChoice { }
- | SynchronisingExternalChoice { }
- | SynchronisingInterrupt { }
- | ReplicatedAlphaParallel {
- repAlphaParReplicatedStatements :: [AnStmt id]
- repAlphaParAlphabet :: AnExp id
- repAlphaParProcess :: AnExp id
- | ReplicatedExternalChoice {
- repExtChoiceReplicatedStatements :: [AnStmt id]
- repExtChoiceProcess :: AnExp id
- | ReplicatedInterleave {
- repInterleaveReplicatedStatements :: [AnStmt id]
- repInterleaveProcess :: AnExp id
- | ReplicatedInternalChoice {
- repIntChoiceReplicatedStatements :: [AnStmt id]
- repIntChoiceProcess :: AnExp id
- | ReplicatedLinkParallel {
- repLinkParTiedChannels :: [(AnExp id, AnExp id)]
- repLinkParTieStatements :: [AnStmt id]
- repLinkParReplicatedStatements :: [AnStmt id]
- repLinkParProcess :: AnExp id
- | ReplicatedParallel {
- repParAlphabet :: AnExp id
- repParReplicatedStatements :: [AnStmt id]
- repParProcess :: AnExp id
- | ReplicatedSequentialComp {
- repSeqCompStatements :: [AnStmt id]
- repSeqCompProcess :: AnExp id
- | ReplicatedSynchronisingExternalChoice { }
- | ExpPatWildCard
- | ExpPatDoublePattern (AnExp id) (AnExp id)
- | TimedPrefix { }
- = App {
- data BinaryMathsOp
- data BinaryBooleanOp
- = And
- | Or
- | Equals
- | NotEquals
- | LessThan
- | GreaterThan
- | LessThanEq
- | GreaterThanEq
- data UnaryMathsOp = Negate
- data UnaryBooleanOp = Not
- data Field id
- data Stmt id
- data Pat id
- = PConcat {
- pConcatLeftPat :: AnPat id
- pConcatRightPat :: AnPat id
- | PDotApp {
- pDotLeftPat :: AnPat id
- pDotRightPat :: AnPat id
- | PDoublePattern {
- pDoublePatLeftPat :: AnPat id
- pDoublePatRightPat :: AnPat id
- | PList {
- pListItems :: [AnPat id]
- | PLit { }
- | PParen {
- pParenPattern :: AnPat id
- | PSet { }
- | PTuple {
- pTupleItems :: [AnPat id]
- | PVar {
- pVarIdentity :: id
- | PWildCard
- | PCompList {
- pListStartItems :: [AnPat id]
- pListMiddleEndItems :: Maybe (AnPat id, [AnPat id])
- pListOriginalPattern :: Pat id
- | PCompDot {
- pDotItems :: [AnPat id]
- pDotOriginalpattern :: Pat id
- = PConcat {
- data InteractiveStmt id
- = Evaluate (AnExp id)
- | Bind [AnDecl id]
- | RunAssertion (AnAssertion id)
- data STypeScheme id = STypeScheme {
- stypeSchemeFreeVars :: [id]
- stypeSchemeTypeConstraints :: [AnSTypeConstraint id]
- stypeSchemeType :: AnSType id
- data STypeConstraint id = STypeConstraint {}
- data SType id
- = STVar id
- | STExtendable (AnSType id) id
- | STSet (AnSType id)
- | STSeq (AnSType id)
- | STDot (AnSType id) (AnSType id)
- | STTuple [AnSType id]
- | STFunction [AnSType id] (AnSType id)
- | STDotable (AnSType id) (AnSType id)
- | STParen (AnSType id)
- | STMap (AnSType id) (AnSType id)
- | STDatatype id
- | STProc
- | STInt
- | STBool
- | STChar
- | STEvent
- type AnCSPMFile id = Annotated () (CSPMFile id)
- type AnDecl id = Annotated (Maybe SymbolTable, PSymbolTable) (Decl id)
- type AnMatch id = Annotated () (Match id)
- type AnPat id = Annotated () (Pat id)
- type AnExp id = Annotated (Maybe Type, PType) (Exp id)
- type AnField id = Annotated () (Field id)
- type AnStmt id = Annotated () (Stmt id)
- type AnDataTypeClause id = Annotated () (DataTypeClause id)
- type AnAssertion id = Annotated () (Assertion id)
- type AnInteractiveStmt id = Annotated () (InteractiveStmt id)
- type AnSTypeScheme id = Annotated () (STypeScheme id)
- type AnSTypeConstraint id = Annotated () (STypeConstraint id)
- type AnSType id = Annotated () (SType id)
- type PCSPMFile = AnCSPMFile UnRenamedName
- type PDecl = AnDecl UnRenamedName
- type PMatch = AnMatch UnRenamedName
- type PPat = AnPat UnRenamedName
- type PExp = AnExp UnRenamedName
- type PField = AnField UnRenamedName
- type PStmt = AnStmt UnRenamedName
- type PDataTypeClause = AnDataTypeClause UnRenamedName
- type PAssertion = AnAssertion UnRenamedName
- type PInteractiveStmt = AnInteractiveStmt UnRenamedName
- type PSTypeScheme = AnSTypeScheme UnRenamedName
- type PSTypeConstraint = AnSTypeConstraint UnRenamedName
- type PSType = AnSType UnRenamedName
- type TCCSPMFile = AnCSPMFile Name
- type TCDecl = AnDecl Name
- type TCMatch = AnMatch Name
- type TCPat = AnPat Name
- type TCExp = AnExp Name
- type TCField = AnField Name
- type TCStmt = AnStmt Name
- type TCDataTypeClause = AnDataTypeClause Name
- type TCAssertion = AnAssertion Name
- type TCInteractiveStmt = AnInteractiveStmt Name
- type TCSTypeScheme = AnSTypeScheme Name
- type TCSTypeConstraint = AnSTypeConstraint Name
- type TCSType = AnSType Name
- getType :: Annotated (Maybe Type, PType) a -> Type
- getSymbolTable :: Annotated (Maybe SymbolTable, PSymbolTable) a -> SymbolTable
Files
Eq id => Eq (CSPMFile id) | |
Ord id => Ord (CSPMFile id) | |
Show id => Show (CSPMFile id) | |
PrettyPrintable id => PrettyPrintable (CSPMFile id) | |
Desugarable (CSPMFile Name) | |
Compressable (CSPMFile a) | |
TypeCheckable (CSPMFile Name) () | |
TypeCheckable (AnCSPMFile Name) () |
allAssertionsInFile :: AnCSPMFile a -> [AnAssertion a]Source
Declarations
FunBind id [AnMatch id] (Maybe (AnSTypeScheme id)) | A function binding, e.g. |
PatBind (AnPat id) (AnExp id) (Maybe (AnSTypeScheme id)) | The binding of a pattern to an expression, e.g. |
Assert (AnAssertion id) | An assertion in a file, e.g. |
External | An import of an external function, e.g. |
| |
Transparent | An import of a transparent function, e.g. |
| |
Channel [id] (Maybe (AnExp id)) | A channel declaration, e.g. |
DataType id [AnDataTypeClause id] | A datatype declaration, e.g. |
SubType id [AnDataTypeClause id] | A subtype declaration, e.g. |
NameType id (AnExp id) | A nametype declaration, e.g. |
Module | A module declaration, e.g. |
| |
TimedSection | A timed section, e.g. |
| |
ParsedTypeAnnotation [id] (AnSTypeScheme id) | A type annotation for the given names. This is only used inside the parser and never appears in outside ASTs. |
ModuleInstance | |
| |
PrintStatement | A print statement, e.g. |
TypeCheckable TCDecl [(Name, Type)] | |
Eq id => Eq (Decl id) | |
Ord id => Ord (Decl id) | |
Show id => Show (Decl id) | |
PrettyPrintable id => PrettyPrintable (Decl id) | |
FreeVars (Decl Name) | |
BoundNames (Decl Name) | |
Compressable (Decl a) | |
TypeCheckable (Decl Name) [(Name, Type)] |
Matches occur on the left hand side of a function declaration and there
is one Match
for each clause of the declaration. For example, given the
declaration:
f() = 0 f(x^xs) = 1+f(xs)
there would be two matches.
Match | |
|
Assertions
Refinement | A refinement assertion, e.g. |
| |
PropertyCheck | A check of property, like deadlock freedom, e.g.
|
ASNot (AnAssertion id) | The negation of an assertion, not currently supported. |
TypeCheckable TCAssertion () | |
Eq id => Eq (Assertion id) | |
Ord id => Ord (Assertion id) | |
Show id => Show (Assertion id) | |
PrettyPrintable id => PrettyPrintable (Assertion id) | |
FreeVars (Assertion Name) | |
Desugarable (Assertion Name) | |
Compressable (Assertion a) | |
TypeCheckable (Assertion Name) () |
data ModelOption id Source
TauPriority (AnExp id) |
Eq id => Eq (ModelOption id) | |
Ord id => Ord (ModelOption id) | |
Show id => Show (ModelOption id) | |
PrettyPrintable id => PrettyPrintable (ModelOption id) | |
FreeVars (ModelOption Name) | |
Desugarable (ModelOption Name) | |
Compressable (ModelOption a) | |
TypeCheckable (ModelOption Name) () |
data SemanticProperty Source
Data Type Clauses
data DataTypeClause id Source
The clause of a datatype, e.g. if a datatype declaration was:
datatype T = A.Int.Bool | B.Bool | C
Then T would have three datatype clauses, one for each of its tags (i.e.
A
, B
and C
).
DataTypeClause | |
|
TypeCheckable TCDataTypeClause (Name, [Type]) | |
Eq id => Eq (DataTypeClause id) | |
Ord id => Ord (DataTypeClause id) | |
Show id => Show (DataTypeClause id) | |
PrettyPrintable id => PrettyPrintable (DataTypeClause id) | |
FreeVars (DataTypeClause Name) | |
BoundNames (DataTypeClause Name) | |
Desugarable (DataTypeClause Name) | |
Compressable (DataTypeClause a) | |
TypeCheckable (DataTypeClause Name) (Name, [Type]) |
Expressions
An expression.
App | Function application. |
| |
BooleanBinaryOp | Application of a binary boolean operator. |
BooleanUnaryOp | Application of a unary boolean operator. |
Concat | List concatenation, e.g. |
| |
DotApp | Dot operator application, e.g. |
| |
If | If statements, e.g. |
| |
Lambda | Lambda functions, e.g. |
| |
Let | Let declarations, e.g. |
| |
Lit | Literals, e.g. |
List | List literals, e.g. |
ListComp | List comprehensions, e.g. |
| |
ListEnumFrom | Infinite list of integers from the given value, e.g. |
| |
ListEnumFromTo | Bounded list of integers between the given values, e.g. |
| |
ListEnumFromComp | List of integers from the given value, concatenating all adjacent
lists, e.g. |
| |
ListEnumFromToComp | List of integers between the given values, concatenating all items into
one list, e.g. |
| |
ListLength | The length of the list, e.g. |
| |
Map | A literal map, e.g. |
| |
MathsBinaryOp | Application of binary maths operator, e.g. |
MathsUnaryOp | Application of unary maths operator, e.g. |
Paren | A user provided bracket, e.g. |
| |
Set | Set literals, e.g. |
SetComp | Set comprehensions, e.g. |
| |
SetEnum | Enumerated Sets, i.e. sets that complete the events, e.g. |
| |
SetEnumComp | Set comprehension version of |
| |
SetEnumFrom | The infinite set of integers from the given value, e.g. |
| |
SetEnumFromTo | The bounded set of integers between the two given values, e.g.
|
| |
SetEnumFromComp | Set of integers from the given value, concatenating all adjacent
sets, e.g. |
| |
SetEnumFromToComp | Set of integers between the given values, concatenating all items into
one set, e.g. |
| |
Tuple | Tuples, e.g. |
| |
Var | Variables, e.g. |
| |
AlphaParallel | Alphabetised parallel, e.g. |
| |
Exception | Exception operator, e.g. |
| |
ExternalChoice | External choice, e.g. |
| |
GenParallel | Generalised parallel, e.g. |
| |
GuardedExp | Guarded expressions, e.g. |
| |
Hiding | Hiding of events, e.g. |
| |
InternalChoice | Internal choice, e.g. |
| |
Interrupt | Interrupt (where the left process is turned off once the right process
performs an event), e.g. |
| |
Interleave | Interleaving of processes, e.g. |
| |
LinkParallel | |
| |
Prefix | Event prefixing, e.g. |
| |
Rename | Event renaming, e.g. |
| |
SequentialComp | Sequential composition, e.g. |
| |
SlidingChoice | Sliding choice, e.g. |
| |
SynchronisingExternalChoice | Synchronising external choice, e.g. |
SynchronisingInterrupt | Synchronising interrupt, e.g. |
ReplicatedAlphaParallel | Replicated alphabetised parallel, e.g. |
| |
ReplicatedExternalChoice | Replicated external choice, e.g. |
| |
ReplicatedInterleave | Replicated interleave, e.g. |
| |
ReplicatedInternalChoice | Replicated internal choice, e.g. |
| |
ReplicatedLinkParallel | Replicated link parallel, e.g.
|
| |
ReplicatedParallel | Replicated parallel, e.g. |
| |
ReplicatedSequentialComp | Replicated sequential choice, e.g. |
| |
ReplicatedSynchronisingExternalChoice | Replicated synchronising external choice, e.g. |
ExpPatWildCard | Used only for parsing - never appears in an AST. |
ExpPatDoublePattern (AnExp id) (AnExp id) | Used only for parsing - never appears in an AST. |
TimedPrefix | A timed prefix - only appears after desugaring. |
|
(Applicative m, Monad m) => MonadicPrettyPrintable m TCExp | |
TypeCheckable TCExp Type | |
(Applicative m, Monad m) => MonadicPrettyPrintable m (Exp Name) | |
Eq id => Eq (Exp id) | |
Ord id => Ord (Exp id) | |
Show id => Show (Exp id) | |
PrettyPrintable id => PrettyPrintable (Exp id) | |
FreeVars (Exp Name) | |
Desugarable (Exp Name) | |
Evaluatable (Exp Name) | |
Compressable (Exp a) | |
TypeCheckable (Exp Name) Type |
data BinaryMathsOp Source
data BinaryBooleanOp Source
data UnaryMathsOp Source
data UnaryBooleanOp Source
Fields
Fields occur within prefix statements. For example, if the prefix
was c$x?y!z
then there would be three fields, of type NonDetInput
,
Input
and Output
respectively.
Output (AnExp id) | !x |
Input (AnPat id) (Maybe (AnExp id)) | ?x:A |
NonDetInput (AnPat id) (Maybe (AnExp id)) |
|
Eq id => Eq (Field id) | |
Ord id => Ord (Field id) | |
Show id => Show (Field id) | |
PrettyPrintable id => PrettyPrintable (Field id) | |
FreeVars (Field Name) | |
BoundNames (Field Name) | |
Desugarable (Field Name) | |
Compressable (Field a) |
Statements
Statements occur on the right hand side of a list comprehension, or
in the context of replicated operators. For example, in
| x <- y, func(b)
, x <- y
and func(b)
are both statements,
of type Generator
and Qualifier
respectively.
Eq id => Eq (Stmt id) | |
Ord id => Ord (Stmt id) | |
Show id => Show (Stmt id) | |
PrettyPrintable id => PrettyPrintable (Stmt id) | |
FreeVars (Stmt Name) | |
BoundNames (Stmt Name) | |
Desugarable (Stmt Name) | |
Compressable (Stmt a) |
Patterns
Patterns match against values and may bind some components of the values to variables.
PConcat | The concatenation of two patterns, e.g. |
| |
PDotApp | The dot of two patterns, e.g. |
| |
PDoublePattern | A double pattern match, e.g. |
| |
PList | A literal pattern list, e.g. |
| |
PLit | A literal pattern, e.g. |
PParen | A user supplied parenthesis in a pattern. |
| |
PSet | A set pattern. Only singleton patterns, or zero patterns are supported.
This is checked by the desugarer. For example, |
PTuple | A tuple pattern, e.g. |
| |
PVar | A variable pattern, e.g. |
| |
PWildCard | Matches anything but does not bind it. |
PCompList | Since you can write list patterns such as: f(<x,y>^xs^<z,p>^<9,0>) f(<x,y>) f(xs^<x,y>) we need an easy may of matching them. Thus, we compile
the patterns to a
|
| |
PCompDot | Like with a |
|
TypeCheckable TCPat Type | |
Eq id => Eq (Pat id) | |
Ord id => Ord (Pat id) | |
Show id => Show (Pat id) | |
PrettyPrintable id => PrettyPrintable (Pat id) | |
FreeVars (Pat Name) | |
BoundNames (Pat Name) | |
Desugarable (Pat Name) | |
Bindable (Pat Name) | |
Compressable (Pat a) | |
TypeCheckable (Pat Name) Type |
Interactive Statements
Interactive statements are intended to be input by an interactive editor.
data InteractiveStmt id Source
A statement in an interactive session.
Evaluate (AnExp id) | |
Bind [AnDecl id] | |
RunAssertion (AnAssertion id) |
TypeCheckable TCInteractiveStmt () | |
Eq id => Eq (InteractiveStmt id) | |
Ord id => Ord (InteractiveStmt id) | |
Show id => Show (InteractiveStmt id) | |
PrettyPrintable id => PrettyPrintable (InteractiveStmt id) | |
Desugarable (InteractiveStmt Name) | |
Compressable (InteractiveStmt a) | |
TypeCheckable (InteractiveStmt Name) () |
Type Annotations
data STypeScheme id Source
A syntatic type scheme.
STypeScheme | |
|
TypeCheckable TCSTypeScheme TypeScheme | |
Eq id => Eq (STypeScheme id) | |
Ord id => Ord (STypeScheme id) | |
Show id => Show (STypeScheme id) | |
PrettyPrintable id => PrettyPrintable (STypeScheme id) | |
Compressable (STypeScheme a) | |
TypeCheckable (STypeScheme Name) TypeScheme |
data STypeConstraint id Source
A syntatic type constraint.
Eq id => Eq (STypeConstraint id) | |
Ord id => Ord (STypeConstraint id) | |
Show id => Show (STypeConstraint id) | |
PrettyPrintable id => PrettyPrintable (STypeConstraint id) |
A syntatic type.
STVar id | |
STExtendable (AnSType id) id | |
STSet (AnSType id) | |
STSeq (AnSType id) | |
STDot (AnSType id) (AnSType id) | |
STTuple [AnSType id] | |
STFunction [AnSType id] (AnSType id) | |
STDotable (AnSType id) (AnSType id) | |
STParen (AnSType id) | |
STMap (AnSType id) (AnSType id) | |
STDatatype id | |
STProc | |
STInt | |
STBool | |
STChar | |
STEvent |
TypeCheckable TCSType Type | |
Eq id => Eq (SType id) | |
Ord id => Ord (SType id) | |
Show id => Show (SType id) | |
PrettyPrintable id => PrettyPrintable (SType id) | |
TypeCheckable (SType Name) Type |
Type Synonyms
As the types are parameterised over the type of names it can be laborious to type the names. Therefore, some shortcuts are provided.
type AnCSPMFile id = Annotated () (CSPMFile id)Source
type AnDecl id = Annotated (Maybe SymbolTable, PSymbolTable) (Decl id)Source
type AnDataTypeClause id = Annotated () (DataTypeClause id)Source
type AnAssertion id = Annotated () (Assertion id)Source
type AnInteractiveStmt id = Annotated () (InteractiveStmt id)Source
type AnSTypeScheme id = Annotated () (STypeScheme id)Source
type AnSTypeConstraint id = Annotated () (STypeConstraint id)Source
Pre-Renaming Types
type PDecl = AnDecl UnRenamedNameSource
type PMatch = AnMatch UnRenamedNameSource
type PPat = AnPat UnRenamedNameSource
type PExp = AnExp UnRenamedNameSource
type PField = AnField UnRenamedNameSource
type PStmt = AnStmt UnRenamedNameSource
type PSType = AnSType UnRenamedNameSource
Post-Renaming Types
type TCCSPMFile = AnCSPMFile NameSource
type TCAssertion = AnAssertion NameSource
type TCSTypeScheme = AnSTypeScheme NameSource