aboutsummaryrefslogtreecommitdiff
path: root/licentia/source
diff options
context:
space:
mode:
Diffstat (limited to 'licentia/source')
-rw-r--r--licentia/source/program/licentia.lux4
-rw-r--r--licentia/source/program/licentia/input.lux10
-rw-r--r--licentia/source/program/licentia/license/addendum.lux2
-rw-r--r--licentia/source/program/licentia/license/black_list.lux4
-rw-r--r--licentia/source/program/licentia/license/distribution.lux4
-rw-r--r--licentia/source/program/licentia/license/notice.lux4
-rw-r--r--licentia/source/program/licentia/license/term.lux2
-rw-r--r--licentia/source/program/licentia/output.lux82
-rw-r--r--licentia/source/test/licentia.lux82
9 files changed, 97 insertions, 97 deletions
diff --git a/licentia/source/program/licentia.lux b/licentia/source/program/licentia.lux
index 21ba1bbfd..5ba705517 100644
--- a/licentia/source/program/licentia.lux
+++ b/licentia/source/program/licentia.lux
@@ -76,8 +76,8 @@
(\ ! each /output.license))))]
(\ file.default write (\ utf8.codec encoded document) output)))]
(wrap (debug.log! (case ?done
- {#try.Success _}
+ {try.#Success _}
(success_message output)
- {#try.Failure message}
+ {try.#Failure message}
message)))))
diff --git a/licentia/source/program/licentia/input.lux b/licentia/source/program/licentia/input.lux
index 2ce3d9144..ebedde054 100644
--- a/licentia/source/program/licentia/input.lux
+++ b/licentia/source/program/licentia/input.lux
@@ -58,8 +58,8 @@
(exception: .public (invalid_period [period (Period Nat)])
(exception.report
- ["Start" (%.nat (value@ #time.start period))]
- ["End" (%.nat (value@ #time.end period))]))
+ ["Start" (%.nat (value@ time.#start period))]
+ ["End" (%.nat (value@ time.#end period))]))
(def: period
(Parser (Period Nat))
@@ -67,8 +67,8 @@
(do <>.monad
[start (<json>.field "start" ..amount)
end (<json>.field "end" ..amount)
- #let [period [#time.start start
- #time.end end]]
+ #let [period [time.#start start
+ time.#end end]]
_ (<>.assert (exception.construct ..invalid_period [period])
(n.<= end start))]
(wrap period))))
@@ -163,6 +163,6 @@
(<json>.field "extension" ..extension)
(<json>.field "black-lists" (<json>.array (<>.some ..black_list)))
(<json>.field "attribution" (<json>.nullable ..attribution))
- (<>.default [#//.commons_clause? false]
+ (<>.default [//.#commons_clause? false]
(<json>.field "addendum" ..addendum))
)))
diff --git a/licentia/source/program/licentia/license/addendum.lux b/licentia/source/program/licentia/license/addendum.lux
index 7cbe236c9..9e1fde9a1 100644
--- a/licentia/source/program/licentia/license/addendum.lux
+++ b/licentia/source/program/licentia/license/addendum.lux
@@ -24,6 +24,6 @@
"")]
["“Commons Clause” License Condition v1.0"
- (value@ #//.commons_clause? value)
+ (value@ //.#commons_clause? value)
..commons_clause]
)))))
diff --git a/licentia/source/program/licentia/license/black_list.lux b/licentia/source/program/licentia/license/black_list.lux
index 2c3d721ca..b17c674bf 100644
--- a/licentia/source/program/licentia/license/black_list.lux
+++ b/licentia/source/program/licentia/license/black_list.lux
@@ -22,11 +22,11 @@
(let [scope (format "The rights granted under " _.license)
effect "shall not be granted to the following entities, or any subsidiary thereof"
justification (|> black_list
- (value@ #//.justification)
+ (value@ //.#justification)
(maybe\each (|>> (format ", due to ")))
(maybe.default ""))
entities (|> black_list
- (value@ #//.entities)
+ (value@ //.#entities)
(list\each ..entity)
(text.interposed text.new_line))]
(format scope " " effect justification ":" text.new_line
diff --git a/licentia/source/program/licentia/license/distribution.lux b/licentia/source/program/licentia/license/distribution.lux
index c1a24a0b5..8471653fa 100644
--- a/licentia/source/program/licentia/license/distribution.lux
+++ b/licentia/source/program/licentia/license/distribution.lux
@@ -105,9 +105,9 @@
(def: .public (extension distribution)
(-> Distribution Text)
($.paragraph ($_ list\composite
- (if (value@ #//.can_re_license? distribution)
+ (if (value@ //.#can_re_license? distribution)
(list allow_re_licensing)
(list))
- (if (value@ #//.can_multi_license? distribution)
+ (if (value@ //.#can_multi_license? distribution)
(list allow_multi_licensing)
(list)))))
diff --git a/licentia/source/program/licentia/license/notice.lux b/licentia/source/program/licentia/license/notice.lux
index 33ea7362e..2579e51e0 100644
--- a/licentia/source/program/licentia/license/notice.lux
+++ b/licentia/source/program/licentia/license/notice.lux
@@ -21,12 +21,12 @@
(def: .public (copyright_holder holder)
(-> //copyright.Holder Text)
- (let [(^slots [#//time.start #//time.end]) (value@ #//copyright.period holder)
+ (let [(^slots [//time.#start //time.#end]) (value@ //copyright.#period holder)
single_year? (n.= start end)
period_section (if single_year?
(%.nat start)
(format (%.nat start) "-" (%.nat end)))]
- (format "Copyright (C) " period_section " " (value@ #//copyright.name holder))))
+ (format "Copyright (C) " period_section " " (value@ //copyright.#name holder))))
(def: .public copyright
(-> (List //copyright.Holder) Text)
diff --git a/licentia/source/program/licentia/license/term.lux b/licentia/source/program/licentia/license/term.lux
index 1b9e55ef7..457bf1bb9 100644
--- a/licentia/source/program/licentia/license/term.lux
+++ b/licentia/source/program/licentia/license/term.lux
@@ -7,7 +7,7 @@
(template [<term> <definition>]
[(def: .public <term>
Text
- (value@ #//definition.term <definition>))]
+ (value@ //definition.#term <definition>))]
[source_code_form //definition.source_code_form]
[object_form //definition.object_form]
diff --git a/licentia/source/program/licentia/output.lux b/licentia/source/program/licentia/output.lux
index 3429df952..583305dd9 100644
--- a/licentia/source/program/licentia/output.lux
+++ b/licentia/source/program/licentia/output.lux
@@ -38,12 +38,12 @@
(def: .public (definition value)
(-> Definition Text)
- (format ($.quote (value@ #definition.term value)) ": " (value@ #definition.meaning value)))
+ (format ($.quote (value@ definition.#term value)) ": " (value@ definition.#meaning value)))
(def: .public (identification value)
(-> Identification Text)
- (format (value@ #license.name value) text.new_line
- (value@ #license.version value)))
+ (format (value@ license.#name value) text.new_line
+ (value@ license.#version value)))
(def: .public (grant termination)
(-> Termination Text)
@@ -55,14 +55,14 @@
grant.copyright]
["Grant of Patent License"
- (grant.patent (value@ #license.patent_retaliation? termination))]
+ (grant.patent (value@ license.#patent_retaliation? termination))]
["Effective Date for the Grants"
grant.date]
["Grant Termination"
- (grant.termination (value@ #license.termination_period termination)
- (value@ #license.grace_period termination))]
+ (grant.termination (value@ license.#termination_period termination)
+ (value@ license.#grace_period termination))]
["No Retroactive Effect of Termination"
grant.no_retroactive_termination])))))
@@ -115,11 +115,11 @@
liability.litigation]
["Accepting Warranty or Additional Liability"
- (value@ #license.can_accept? value)
+ (value@ license.#can_accept? value)
liability.can_accept]
["High Risk Activities"
- (value@ #license.disclaim_high_risk? value)
+ (value@ license.#disclaim_high_risk? value)
liability.disclaim_high_risk])))))
(def: .public (distribution distribution)
@@ -139,8 +139,8 @@
distribution.object_form]
[(format "Distribution of an " _.extension)
- (or (value@ #license.can_re_license? distribution)
- (value@ #license.can_multi_license? distribution))
+ (or (value@ license.#can_re_license? distribution)
+ (value@ license.#can_multi_license? distribution))
(distribution.extension distribution)])))))
(def: .public (commercial value)
@@ -152,25 +152,25 @@
"")]
["Non-Commerciality"
- (not (value@ #license.can_sell? value))
+ (not (value@ license.#can_sell? value))
commercial.cannot_sell]
[(format _.contributor " Attribution")
- (value@ #license.require_contributor_credit? value)
+ (value@ license.#require_contributor_credit? value)
commercial.require_contributor_attribution]
[(format _.contributor " Endorsement")
- (not (value@ #license.allow_contributor_endorsement? value))
+ (not (value@ license.#allow_contributor_endorsement? value))
commercial.disallow_contributor_endorsement]
)))))
(def: .public (extension value)
(-> Extension Text)
- (let [[show? document] (case (value@ #license.notification_period value)
- {#.Some period}
+ (let [[show? document] (case (value@ license.#notification_period value)
+ {.#Some period}
[true (extension.notification_requirement period)]
- #.None
+ {.#None}
[false ""])]
(`` (format (~~ (template [<condition> <title> <content>]
[(if <condition>
@@ -178,34 +178,34 @@
#$.content <content>]))
"")]
- [(value@ #license.same_license? value) "License Retention"
+ [(value@ license.#same_license? value) "License Retention"
($.paragraph (list\composite extension.sharing_requirement
extension.license_conflict_resolution))]
- [(value@ #license.must_be_distinguishable? value) (format _.extension " Distinctness")
+ [(value@ license.#must_be_distinguishable? value) (format _.extension " Distinctness")
extension.distinctness_requirement]
[show? (format _.source_code_form " Availability")
document]
- [(value@ #license.must_describe_modifications? value) (format "Description of " ($.plural _.modification))
+ [(value@ license.#must_describe_modifications? value) (format "Description of " ($.plural _.modification))
extension.description_requirement]))))))
(def: .public (attribution value)
(-> Attribution Text)
- (let [copyright_notice (format "Attribution Copyright Notice: " (value@ #license.copyright_notice value))
- phrase (case (value@ #license.phrase value)
- {#.Some phrase}
+ (let [copyright_notice (format "Attribution Copyright Notice: " (value@ license.#copyright_notice value))
+ phrase (case (value@ license.#phrase value)
+ {.#Some phrase}
(format text.new_line "Attribution Phrase: " phrase text.new_line)
- #.None
+ {.#None}
"")
- url (format text.new_line "Attribution URL: " (value@ #license.url value))
- image (case (value@ #license.image value)
- {#.Some image}
+ url (format text.new_line "Attribution URL: " (value@ license.#url value))
+ image (case (value@ license.#image value)
+ {.#Some image}
(format text.new_line "Attribution Image: " image)
- #.None
+ {.#None}
"")]
(format copyright_notice
phrase
@@ -254,20 +254,20 @@
(def: .public (license value)
(-> License Text)
(let [identification (|> value
- (value@ #license.identification)
+ (value@ license.#identification)
(maybe\each ..identification)
(maybe.default ""))
- identified? (case (value@ #license.identification value)
- {#.Some _}
+ identified? (case (value@ license.#identification value)
+ {.#Some _}
true
- #.None
+ {.#None}
false)]
(`` (format ($.block identification)
- ($.block (notice.copyright (value@ #license.copyright_holders value)))
+ ($.block (notice.copyright (value@ license.#copyright_holders value)))
- (case (value@ #license.black_lists value)
- #.Nil
+ (case (value@ license.#black_lists value)
+ {.#End}
""
black_lists
@@ -284,20 +284,20 @@
($.block ($.section [#$.title (format "Acceptance of " _.license)
#$.content limitation.acceptance]))
- (..grant (value@ #license.termination value))
+ (..grant (value@ license.#termination value))
..limitation
..assurance
($.block ($.section [#$.title (format _.submission " of " ($.plural _.contribution))
#$.content submission.contribution]))
- (..liability (value@ #license.liability value))
- (..distribution (value@ #license.distribution value))
- (..commercial (value@ #license.commercial value))
- (..extension (value@ #license.extension value))
+ (..liability (value@ license.#liability value))
+ (..distribution (value@ license.#distribution value))
+ (..commercial (value@ license.#commercial value))
+ (..extension (value@ license.#extension value))
(|> value
- (value@ #license.attribution)
+ (value@ license.#attribution)
(maybe\each (|>> ..attribution
["Attribution Information"]
$.section
@@ -306,7 +306,7 @@
(..miscellaneous identified?)
- (addendum.output (value@ #license.addendum value))
+ (addendum.output (value@ license.#addendum value))
notice.end_of_license
))))
diff --git a/licentia/source/test/licentia.lux b/licentia/source/test/licentia.lux
index 7caf5301c..e297f92e0 100644
--- a/licentia/source/test/licentia.lux
+++ b/licentia/source/test/licentia.lux
@@ -53,8 +53,8 @@
end (\ ! each
(|>> (n.% wiggle_room) (n.max 1))
random.nat)]
- (wrap [#time.start start
- #time.end end])))
+ (wrap [time.#start start
+ time.#end end])))
(def: copyright_holder
(Random copyright.Holder)
@@ -161,16 +161,16 @@
(_.test "Copyright grant is present."
(present? grant.copyright))
(_.test "Patent grant is present."
- (present? (grant.patent (value@ #license.patent_retaliation? termination))))
+ (present? (grant.patent (value@ license.#patent_retaliation? termination))))
(_.test "Effective date for the grants is present."
(present? grant.date))
(_.test "Patent grant is present."
- (present? (grant.termination (value@ #license.termination_period termination)
- (value@ #license.grace_period termination))))
+ (present? (grant.termination (value@ license.#termination_period termination)
+ (value@ license.#grace_period termination))))
(_.test "The termination period is accurately conveyed."
- (present? (grant.grant_restoration_clause (value@ #license.termination_period termination))))
+ (present? (grant.grant_restoration_clause (value@ license.#termination_period termination))))
(_.test "The grace period is accurately conveyed."
- (present? (grant.grace_period_clause (value@ #license.grace_period termination))))
+ (present? (grant.grace_period_clause (value@ license.#grace_period termination))))
(_.test "The grants are not retro-actively terminated."
(present? grant.no_retroactive_termination))
))
@@ -185,10 +185,10 @@
(_.test "Litigation conditions are present."
(present? liability.litigation))
(_.test "Liability acceptance conditions may be present."
- (bit\= (value@ #license.can_accept? liability)
+ (bit\= (value@ license.#can_accept? liability)
(present? liability.can_accept)))
(_.test "Liability acceptance conditions may be present."
- (bit\= (value@ #license.disclaim_high_risk? liability)
+ (bit\= (value@ license.#disclaim_high_risk? liability)
(present? liability.disclaim_high_risk)))
))
@@ -207,13 +207,13 @@
(Concern Commercial)
($_ _.and
(_.test "Non-commercial clause is present."
- (bit\= (not (value@ #license.can_sell? commercial))
+ (bit\= (not (value@ license.#can_sell? commercial))
(present? commercial.cannot_sell)))
(_.test "Contributor credit condition is present."
- (bit\= (value@ #license.require_contributor_credit? commercial)
+ (bit\= (value@ license.#require_contributor_credit? commercial)
(present? commercial.require_contributor_attribution)))
(_.test "Anti-endorsement condition is present."
- (bit\= (not (value@ #license.allow_contributor_endorsement? commercial))
+ (bit\= (not (value@ license.#allow_contributor_endorsement? commercial))
(present? commercial.disallow_contributor_endorsement)))
))
@@ -221,21 +221,21 @@
(Concern Extension)
($_ _.and
(_.test "The license is viral."
- (bit\= (value@ #license.same_license? extension)
+ (bit\= (value@ license.#same_license? extension)
(and (list.every? present? extension.sharing_requirement)
(list.every? present? extension.license_conflict_resolution))))
(_.test "Extensions must be distinguishable from the original work."
- (bit\= (value@ #license.must_be_distinguishable? extension)
+ (bit\= (value@ license.#must_be_distinguishable? extension)
(present? extension.distinctness_requirement)))
(_.test "The community must be notified of new extensions."
- (case (value@ #license.notification_period extension)
- {#.Some period}
+ (case (value@ license.#notification_period extension)
+ {.#Some period}
(present? (extension.notification_requirement period))
- #.None
+ {.#None}
true))
(_.test "Must describe modifications."
- (bit\= (value@ #license.must_describe_modifications? extension)
+ (bit\= (value@ license.#must_describe_modifications? extension)
(present? extension.description_requirement)))
))
@@ -243,17 +243,17 @@
(Concern Attribution)
($_ _.and
(_.test "The attribution copyright notice is present."
- (present? (value@ #license.copyright_notice attribution)))
+ (present? (value@ license.#copyright_notice attribution)))
(_.test "The attribution phrase is present."
(|> attribution
- (value@ #license.phrase)
+ (value@ license.#phrase)
(maybe\each present?)
(maybe.default true)))
(_.test "The attribution URL is present."
- (present? (value@ #license.url attribution)))
+ (present? (value@ license.#url attribution)))
(_.test "The attribution image is present."
(|> attribution
- (value@ #license.image)
+ (value@ license.#image)
(maybe\each present?)
(maybe.default true)))
))
@@ -279,7 +279,7 @@
(Concern Addendum)
($_ _.and
(_.test "Commons clause"
- (bit\= (value@ #license.commons_clause? value)
+ (bit\= (value@ license.#commons_clause? value)
(present? addendum.commons_clause)))
))
@@ -294,32 +294,32 @@
($_ _.and
(_.test "Copyright notices are present."
(list.every? (|>> notice.copyright_holder present?)
- (value@ #license.copyright_holders license)))
+ (value@ license.#copyright_holders license)))
(_.test "Identification is present (if the license is identified)."
- (case (value@ #license.identification license)
- {#.Some identification}
+ (case (value@ license.#identification license)
+ {.#Some identification}
(and (present? (output.identification identification))
(present? miscellaneous.new_versions))
- #.None
+ {.#None}
(not (present? miscellaneous.new_versions))))
(_.test "Black-lists (if wanted by licensor) are explicitly enumerated and justified."
(list.every? (function (_ black_list)
- (let [black_list_is_justified? (case (value@ #license.justification black_list)
- {#.Some justification}
+ (let [black_list_is_justified? (case (value@ license.#justification black_list)
+ {.#Some justification}
(present? justification)
- #.None
+ {.#None}
bit.yes)
every_entity_is_mentioned? (|> black_list
- (value@ #license.entities)
+ (value@ license.#entities)
(list\each black_list.entity)
(list.every? present?))]
(and black_list_is_justified?
every_entity_is_mentioned?)))
- (value@ #license.black_lists license)))
+ (value@ license.#black_lists license)))
(_.test "All definitions are present."
(list.every? (|>> output.definition present?)
@@ -328,7 +328,7 @@
(_.test "Acceptance of the license is demanded."
(present? limitation.acceptance))
- (..about_grant present? (value@ #license.termination license))
+ (..about_grant present? (value@ license.#termination license))
(_.test "All limitations are present."
(present? output.limitation))
@@ -339,25 +339,25 @@
(_.test "The terms of submission are present."
(present? submission.contribution))
- (..about_liability present? (value@ #license.liability license))
+ (..about_liability present? (value@ license.#liability license))
- (..about_distribution present? (value@ #license.distribution license))
+ (..about_distribution present? (value@ license.#distribution license))
- (..about_commercial present? (value@ #license.commercial license))
+ (..about_commercial present? (value@ license.#commercial license))
- (..about_extension present? (value@ #license.extension license))
+ (..about_extension present? (value@ license.#extension license))
- (case (value@ #license.attribution license)
- {#.Some attribution}
+ (case (value@ license.#attribution license)
+ {.#Some attribution}
(..about_attribution present? attribution)
- #.None
+ {.#None}
(_.test "Attribution is missing."
bit.yes))
(..about_miscellaneous present?)
- (..about_addendum present? (value@ #license.addendum license))
+ (..about_addendum present? (value@ license.#addendum license))
(_.test "License ending footer is present."
(present? notice.end_of_license))