diff --git a/assets/prelude.ld b/assets/prelude.ld index ee98016..3a2e60d 100644 --- a/assets/prelude.ld +++ b/assets/prelude.ld @@ -1137,7 +1137,7 @@ fn heed { fn send_sync { "Sends the message to the specified process, and waits for a response in the form of a `(:reply, response)` tuple." (pid, msg) -> { - send (pid, msg) + send! (pid, msg) receive { (:reply, res) -> res } @@ -1157,7 +1157,7 @@ fn request_fetch! { request_fetch! (pid) } else { - send (pid, (:reply, unbox (fetch_inbox))) + send! (pid, (:reply, unbox (fetch_inbox))) store! (fetch_inbox, ()) } } @@ -1167,7 +1167,7 @@ fn fetch { "Requests the contents of the URL passed in. Returns a result tuple of (:ok, ) or (:err, )." (url) -> { let pid = self () - spawn! (fn () -> request_fetch! (pid, url)) + spawn (fn () -> request_fetch! (pid, url)) receive { (:reply, (_, response)) -> response } @@ -1182,7 +1182,7 @@ fn input_reader! { input_reader! (pid) } else { - send (pid, (:reply, unbox (input))) + send! (pid, (:reply, unbox (input))) store! (input, nil) } } @@ -1192,7 +1192,7 @@ fn read_input { "Waits until there is input in the input buffer, and returns it once there is." () -> { let pid = self () - spawn! (fn () -> input_reader! (pid)) + spawn (fn () -> input_reader! (pid)) receive { (:reply, response) -> response } @@ -1390,10 +1390,10 @@ fn turtle_listener () -> { add_command! (self (), (:loadstate, position, heading, visible?, pendown?, penwidth, pencolor)) } - (:pencolor, pid) -> send (pid, (:reply, do turtle_states > unbox > self () > :pencolor)) - (:position, pid) -> send (pid, (:reply, do turtle_states > unbox > self () > :position)) - (:penwidth, pid) -> send (pid, (:reply, do turtle_states > unbox > self () > :penwidth)) - (:heading, pid) -> send (pid, (:reply, do turtle_states > unbox > self () > :heading)) + (:pencolor, pid) -> send! (pid, (:reply, do turtle_states > unbox > self () > :pencolor)) + (:position, pid) -> send! (pid, (:reply, do turtle_states > unbox > self () > :position)) + (:penwidth, pid) -> send! (pid, (:reply, do turtle_states > unbox > self () > :penwidth)) + (:heading, pid) -> send! (pid, (:reply, do turtle_states > unbox > self () > :heading)) does_not_understand -> { let pid = self () panic! "{pid} does not understand message: {does_not_understand}" @@ -1405,7 +1405,7 @@ fn turtle_listener () -> { fn spawn_turtle { "Spawns a new turtle in a new process. Methods on the turtle process mirror those of turtle graphics functions in prelude. Returns the pid of the new turtle." () -> { - let pid = spawn! (fn () -> turtle_listener ()) + let pid = spawn (fn () -> turtle_listener ()) update! (turtle_states, assoc (_, pid, turtle_init)) pid } diff --git a/pkg/rudus_bg.wasm b/pkg/rudus_bg.wasm index 96ba329..b9c00fc 100644 Binary files a/pkg/rudus_bg.wasm and b/pkg/rudus_bg.wasm differ