diff --git a/README.adoc b/README.adoc index a881502..40469bb 100644 --- a/README.adoc +++ b/README.adoc @@ -35,10 +35,6 @@ strongly-typed, affine-typed, WASM-targeting world ---- // face: jaffascript -effect IO { - fn println(s: String) -> (); -} - function main() -{IO}-> () { const greeting = "Hello, JaffaScript!"; println(greeting); diff --git a/examples/hello.affine b/examples/hello.affine index 43d00fe..73f6ead 100644 --- a/examples/hello.affine +++ b/examples/hello.affine @@ -5,10 +5,11 @@ // `const`/`let` bindings (let lowers to let mut), brace-delimited // blocks, `===` equality. // face: jaffascript - -effect IO { - fn println(s: String) -> (); -} +// +// `println` is the AffineScript builtin, which already carries the `IO` +// effect. Do not declare `effect IO { fn println … }` here: a declared +// effect shadows the builtin, and `eval` then stops with +// "Unhandled effect: println" because nothing handles it. function main() -{IO}-> () { const greeting = "Hello, JaffaScript!";