Commit Graph

4 Commits

Author SHA1 Message Date
Tony Garnock-Jones 1e29d528d7 Support toplevel typed binders in patterns 2024-03-21 16:04:30 +01:00
Tony Garnock-Jones 73b7759816 Allow statement boundary to include end-of-group, so long as the group is toplevel or braces 2024-03-21 16:04:03 +01:00
Tony Garnock-Jones be74496012 Prettifier to make compiler tests easier to read and write 2024-03-10 14:26:04 +01:00
Tony Garnock-Jones b4d728ca7a Change `stop` to refer to a lexical facet, not a dynamic facet.
The previous behaviour of `stop` was inappropriate: it always stopped
`Syndicate.Turn.activeFacet`, which is an instance of dynamic binding.

Now, it instead stops the unique lexically-innermost lexically-apparent
facet - the special name `currentSyndicateFacet` - by default. It is an
error if no such facet is lexically apparent (if `currentSyndicateFacet` is
unbound). This makes it similar to `break` and `continue` in structured
programming.

In addition, an expression denoting a facet can now be used with `stop` to
override this default - again, like `break` and `continue` in some
languages.

Finally, `react` can now be preceded by a label, which binds the label as a
variable denoting the newly-created facet (inside the facet's scope).
2024-03-09 23:04:29 +01:00