Skip to content
Snippets Groups Projects

Add applicable records

Merged David Thompson requested to merge applicable-structs into main
1 unresolved thread
Compare and Show latest version
11 files
+ 559
219
Compare changes
  • Side-by-side
  • Inline
Files
11
+ 21
14
@@ -94,23 +94,32 @@ we may be little schemers, we want our work to help advance the Wasm
standard for all dynamic languages.
@menu
* Supported platforms:: Where you can run Hoot.
* Status:: What works. What doesn't.
* Installation:: Setting up Hoot.
* Tutorial:: Compiling your first Scheme program to Wasm.
@end menu
@node Supported platforms
@section Supported platforms
Hoot's Scheme binaries are supported on the following Wasm runtimes:
@itemize
@item Mozilla Firefox 121 or later
@item Google Chrome 119 or later
@item Apple Safari 18.2 or later
@item NodeJS 22.3.0 or later
@end itemize
@node Status
@section Status
Hoot's Wasm output is compatible with Google Chrome starting with
version 119 and Mozilla Firefox starting with version 121. As of
writing, WebKit/Apple Safari is not yet compatible.
Hoot is still in an early phase of active development and its API
should be considered unstable and subject to change in future
releases. Hoot currently supports a subset of the R7RS-small Scheme
specification, along with a small set of Guile-specific functionality
such as @inlinefmtifelse{html,
releases. Hoot currently supports most of the R7RS-small Scheme
specification, a bit of R6RS, along with some Guile-specific
functionality such as @inlinefmtifelse{html,
@url{https://www.gnu.org/software/guile/manual/html_node/Prompts.html,
prompts}, @ref{Prompts,,,Guile Reference}}.
@@ -471,9 +480,7 @@ backend that compiles CPS to Wasm.
In contrast to Guile's approach of compiling individual modules, Hoot
is a whole-program compiler. The user program and all imported
modules are part of the same compilation unit and the result is a
single Wasm binary. Currently, Hoot uses the R6RS library system and
does not support Guile's @code{define-module} form or R7RS style
libraries.
single Wasm binary.
For hooking the Hoot compiler up to a build system such as GNU Make,
invoke the @command{guild compile-wasm} tool:
@@ -1860,13 +1867,13 @@ appear more than once in the fields section.
@end deffn
@subsection Applicable structs
@subsection Applicable records
Hoot's record type system can be used to create new types that can be
applied as if they were regular procedures. These are known as
@emph{applicable records}. The @code{<applicable-reord>} record type
defines a single field that should contain a procedure. Any record
type that descends from the @code{<applicable-record>} lineage (via
@emph{applicable records}. The @code{<applicable-reord>} type defines
a single field that should contain a procedure. Any record type that
descends from the @code{<applicable-record>} lineage (via
@code{#:parent}) becomes procedure-like.
As a contrived example, an incrementing counter could be implemented
Loading