Introduced expanders for events (define-event-expander) and for
assertion-patterns (define-assertion-expander).
Introduced convenience syntax and utilities in web.rkt for working
with web requests.
Support nested bindings in assertion-patterns for message events
(only).
Prior to this commit, the stop-whens were using
current-inexact-milliseconds in a comparison to detect a timeout,
meaning that timeouts would be missed. This commit introduces a
redundant copy of current-inexact-milliseconds in a field and changes it
on every event so that stop-when expressions involving the field are
reevaluated properly frequently.
Adding `#'module+` explicitly to the stop-list for local-expand stops
the infinite recursion (problem 1 in the issue description). The code
goes on to treat it like `#'module` and `#'module+`, namely as a
non-action-producing form.
Problem 2 in the issue description is interesting. I haven't done
anything in particular to address the production of unbounded `X` ->
`(begin X)` expansions, but it seems not currently to be a problem;
and, weirdly (?), submodules in a `#lang syndicate` or `#lang
syndicate/actor` module do not seem to inherit the `#%module-begin` of
their container! That is, `(module+ main)`, `(module+ test)` etc. all
seem to have a `racket/base` `#%module-begin`, though I've not looked
very far into this.
Most peculiar on this front is that if the `#,@(reverse final-forms)`
precedes the `(module+ syndicate-main ...)`, and the module being
processed includes, say, a `(module+ main)`, then for some reason the
resulting `main` submodule *is* treated as having a `syndicate/lang`
`#%module-begin` (thus causing problems as suggested in the issue
description)! I *really* don't understand why that might be, and
haven't spent very much time investigating after I noticed that so
long as the `main`-required `syndicate-main` submodule preceded all
other submodule declarations, things seemed to work out.
This whole approach is still a bit dicey: for example, the following
will erroneously treat `(foo quux)` as an expression yielding actions,
rather than a struct declaration:
#lang syndicate
(define-syntax-rule (foo x) (struct x ()))
(foo quux)