Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 5 additions & 4 deletions examples/hello.affine
Original file line number Diff line number Diff line change
Expand Up @@ -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!";
Expand Down
Loading