aboutsummaryrefslogtreecommitdiff
path: root/licentia/source
diff options
context:
space:
mode:
authorEduardo Julian2022-08-11 04:15:07 -0400
committerEduardo Julian2022-08-11 04:15:07 -0400
commit065e8a4d8122d4616b570496915d2c0e2c78cd6b (patch)
treef2bbdc3e40b796b34026ab04c9a478d8a3f082d5 /licentia/source
parent68d78235694c633c956bb9e8a007cad7d65370bc (diff)
Re-named the "case" macro to "when".
Diffstat (limited to '')
-rw-r--r--licentia/source/program/licentia.lux2
-rw-r--r--licentia/source/program/licentia/output.lux10
-rw-r--r--licentia/source/test/licentia.lux8
3 files changed, 10 insertions, 10 deletions
diff --git a/licentia/source/program/licentia.lux b/licentia/source/program/licentia.lux
index d4478b885..e721e69b1 100644
--- a/licentia/source/program/licentia.lux
+++ b/licentia/source/program/licentia.lux
@@ -76,7 +76,7 @@
(<json>.result /input.license)
(at ! each /output.license))))]
(at file.default write (at utf8.codec encoded document) output)))]
- (wrap (debug.log! (case ?done
+ (wrap (debug.log! (when ?done
{try.#Success _}
(success_message output)
diff --git a/licentia/source/program/licentia/output.lux b/licentia/source/program/licentia/output.lux
index 0f05937e2..30bdfaf5a 100644
--- a/licentia/source/program/licentia/output.lux
+++ b/licentia/source/program/licentia/output.lux
@@ -166,7 +166,7 @@
(def .public (extension value)
(-> Extension Text)
- (let [[show? document] (case (the license.#notification_period value)
+ (let [[show? document] (when (the license.#notification_period value)
{.#Some period}
[true (extension.notification_requirement period)]
@@ -194,14 +194,14 @@
(def .public (attribution value)
(-> Attribution Text)
(let [copyright_notice (format "Attribution Copyright Notice: " (the license.#copyright_notice value))
- phrase (case (the license.#phrase value)
+ phrase (when (the license.#phrase value)
{.#Some phrase}
(format text.new_line "Attribution Phrase: " phrase text.new_line)
{.#None}
"")
url (format text.new_line "Attribution URL: " (the license.#url value))
- image (case (the license.#image value)
+ image (when (the license.#image value)
{.#Some image}
(format text.new_line "Attribution Image: " image)
@@ -257,7 +257,7 @@
(the license.#identification)
(maybe#each ..identification)
(maybe.default ""))
- identified? (case (the license.#identification value)
+ identified? (when (the license.#identification value)
{.#Some _}
true
@@ -266,7 +266,7 @@
(`` (format ($.block identification)
($.block (notice.copyright (the license.#copyright_holders value)))
- (case (the license.#black_lists value)
+ (when (the license.#black_lists value)
{.#End}
""
diff --git a/licentia/source/test/licentia.lux b/licentia/source/test/licentia.lux
index 91121c9b1..4183dc564 100644
--- a/licentia/source/test/licentia.lux
+++ b/licentia/source/test/licentia.lux
@@ -229,7 +229,7 @@
(bit#= (the license.#must_be_distinguishable? extension)
(present? extension.distinctness_requirement)))
(_.test "The community must be notified of new extensions."
- (case (the license.#notification_period extension)
+ (when (the license.#notification_period extension)
{.#Some period}
(present? (extension.notification_requirement period))
@@ -298,7 +298,7 @@
(the license.#copyright_holders license)))
(_.test "Identification is present (if the license is identified)."
- (case (the license.#identification license)
+ (when (the license.#identification license)
{.#Some identification}
(and (present? (output.identification identification))
(present? miscellaneous.new_versions))
@@ -308,7 +308,7 @@
(_.test "Black-lists (if wanted by licensor) are explicitly enumerated and justified."
(list.every? (function (_ black_list)
- (let [black_list_is_justified? (case (the license.#justification black_list)
+ (let [black_list_is_justified? (when (the license.#justification black_list)
{.#Some justification}
(present? justification)
@@ -348,7 +348,7 @@
(..about_extension present? (the license.#extension license))
- (case (the license.#attribution license)
+ (when (the license.#attribution license)
{.#Some attribution}
(..about_attribution present? attribution)