Download Lucid Synchrone Manual

Transcript
Testing the Presence of Signals
A present statement is pretty much the same as a pattern-matching statement. It is of the
form:
present def-present-handler1 | ... | def-present-handlern end
Where a handler is of the form:
signal-pattern -> action
Signal patterns are tested sequentially and the one which succeed defines the corresponding
action to execute. Finally, a handler:
-> action
defines a condition which always succeed.
3.11
Type definition
Abstract types can be defined. Their syntax is inherited from Objective Caml and is
reminded here.
3.12
type-definition
::=
type typedef { and typedef }
typedef
::=
|
|
[ type-params ] typeconstr-name
sum-type-def
record-type-def
sum-type-def
::=
[ | ] one-sum-def { | one-sum-def }
one-sum-def
::=
|
capitalized-ident
capitalized-ident of type
record-type-def
::=
{ label-type { ; label-type } }
label-type
::=
ident : type
type-params
::=
|
’ ident
( ’ ident { , ’ ident } )
Module implementation
implementation
::=
{ impl-phrase [ ;; ] }
impl-phrase
::=
|
|
value-definition
type-definition
open module-name
value-definition
::=
let [ rec] let-binding { and let-binding } [ ; ]