From b37d147c9e9efc8ab43bd2449801bf1c393dddba Mon Sep 17 00:00:00 2001 From: Manuel Serrano Date: Tue, 27 Feb 2024 10:41:30 +0100 Subject: [PATCH] Signal documentation --- doc/lang/module.md | 3 +++ doc/lang/signal.md | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/doc/lang/module.md b/doc/lang/module.md index 526731e7..c754d882 100644 --- a/doc/lang/module.md +++ b/doc/lang/module.md @@ -64,6 +64,9 @@ module to be executed, its signals have to be bound the caller signals in its scope (the scope of the corresponding `run` form). +Within a module, the `in`, `out`, and `inout` signals can be used +as any [local signals](./signal.md). + For instance, the `M1` module can be used in the following `run` statement from a `M2` module. diff --git a/doc/lang/signal.md b/doc/lang/signal.md index 71a7cf98..94a729e4 100644 --- a/doc/lang/signal.md +++ b/doc/lang/signal.md @@ -77,6 +77,12 @@ hiphop module M() { } ``` +[Module signals](./module.md) are declared with the keywords `in`, +`out`, and `inout`. The signals can be used from outside of the +machine to pass values in or to receive values after a reaction. + +These are signals + ★ Example: [samelocalname.hh.js](../../test/samelocalname.hh.js) Signals can only be emitted once per instant, unless they are declared