Skip to content

Commit

Permalink
Signal documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-serrano committed Feb 27, 2024
1 parent 8669144 commit b37d147
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/lang/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
6 changes: 6 additions & 0 deletions doc/lang/signal.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b37d147

Please sign in to comment.