From 065e8a4d8122d4616b570496915d2c0e2c78cd6b Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 11 Aug 2022 04:15:07 -0400 Subject: Re-named the "case" macro to "when". --- stdlib/source/format/lux/data/binary.lux | 8 ++++---- stdlib/source/format/lux/data/text.lux | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'stdlib/source/format') diff --git a/stdlib/source/format/lux/data/binary.lux b/stdlib/source/format/lux/data/binary.lux index 761176a3a..034d4edd7 100644 --- a/stdlib/source/format/lux/data/binary.lux +++ b/stdlib/source/format/lux/data/binary.lux @@ -96,7 +96,7 @@ (def .public (or left right) (All (_ l r) (-> (Format l) (Format r) (Format (Or l r)))) (function (_ altV) - (case altV + (when altV (^.with_template [ ] [{ caseV} (let [[caseS caseT] ( caseV)] @@ -126,7 +126,7 @@ (def .public bit (Format Bit) - (|>> (pipe.case #0 0 #1 1) ..bits_8)) + (|>> (pipe.when #0 0 #1 1) ..bits_8)) (with_template [ ] [(def .public (Format ) ..bits_64)] @@ -241,7 +241,7 @@ indexed ..nat quantified (..and (..list again) again)] (function (_ altV) - (case altV + (when altV (^.with_template [ ] [{ caseV} (let [[caseS caseT] ( caseV)] @@ -275,7 +275,7 @@ (let [sequence (..list again)] (..and ..location (function (_ altV) - (case altV + (when altV (^.with_template [ ] [{ caseV} (let [[caseS caseT] ( caseV)] diff --git a/stdlib/source/format/lux/data/text.lux b/stdlib/source/format/lux/data/text.lux index f9d79c466..7d237bea2 100644 --- a/stdlib/source/format/lux/data/text.lux +++ b/stdlib/source/format/lux/data/text.lux @@ -126,7 +126,7 @@ (def .public (maybe format) (All (_ a) (-> (Format a) (Format (Maybe a)))) (function (_ value) - (case value + (when value {.#None} "{.#None}" -- cgit v1.2.3