From 8c3a1afab9efeb86e2f53d743551fc689fbad257 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 12 Jun 2022 13:33:48 -0400 Subject: De-sigil-ification: suffix : [Part 4] --- stdlib/source/test/aedifex/command/version.lux | 50 +++++++++++++------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'stdlib/source/test/aedifex/command/version.lux') diff --git a/stdlib/source/test/aedifex/command/version.lux b/stdlib/source/test/aedifex/command/version.lux index bb92fadfb..96b8cdf3b 100644 --- a/stdlib/source/test/aedifex/command/version.lux +++ b/stdlib/source/test/aedifex/command/version.lux @@ -29,32 +29,32 @@ (exception: .public console_is_closed!) -(implementation: mock +(def: mock (Mock [Bit Text]) - - (def: (on_read [open? state]) - (if open? - (try.of_maybe - (do maybe.monad - [head (text.char 0 state) - [_ tail] (text.split_at 1 state)] - (in [[open? tail] head]))) - (exception.except ..console_is_closed! []))) - (def: (on_read_line [open? state]) - (if open? - (try.of_maybe - (do maybe.monad - [[output state] (text.split_by text.new_line state)] - (in [[open? state] output]))) - (exception.except ..console_is_closed! []))) - (def: (on_write input [open? state]) - (if open? - {try.#Success [open? (format state input)]} - (exception.except ..console_is_closed! []))) - (def: (on_close [open? buffer]) - (if open? - {try.#Success [false buffer]} - (exception.except ..console_is_closed! [])))) + (implementation + (def: (on_read [open? state]) + (if open? + (try.of_maybe + (do maybe.monad + [head (text.char 0 state) + [_ tail] (text.split_at 1 state)] + (in [[open? tail] head]))) + (exception.except ..console_is_closed! []))) + (def: (on_read_line [open? state]) + (if open? + (try.of_maybe + (do maybe.monad + [[output state] (text.split_by text.new_line state)] + (in [[open? state] output]))) + (exception.except ..console_is_closed! []))) + (def: (on_write input [open? state]) + (if open? + {try.#Success [open? (format state input)]} + (exception.except ..console_is_closed! []))) + (def: (on_close [open? buffer]) + (if open? + {try.#Success [false buffer]} + (exception.except ..console_is_closed! []))))) (def: .public echo (-> Text (Console Async)) -- cgit v1.2.3