diff options
author | Eduardo Julian | 2021-06-14 18:33:54 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-06-14 18:33:54 -0400 |
commit | 519c0c0c71cdf7ce3dfc64b9781ab826760b3d94 (patch) | |
tree | 75fa0672afceff129e5e75afb7a5fed197ce1773 /licentia/source/program | |
parent | af3e6e2cb011dc2ad9204440990731a2f272716d (diff) |
Extracted Licentia out of the standard library.
Diffstat (limited to '')
-rw-r--r-- | licentia/source/program/licentia.lux (renamed from stdlib/source/program/licentia.lux) | 49 | ||||
-rw-r--r-- | licentia/source/program/licentia/document.lux (renamed from stdlib/source/program/licentia/document.lux) | 10 | ||||
-rw-r--r-- | licentia/source/program/licentia/input.lux (renamed from stdlib/source/program/licentia/input.lux) | 29 | ||||
-rw-r--r-- | licentia/source/program/licentia/license.lux (renamed from stdlib/source/program/licentia/license.lux) | 38 | ||||
-rw-r--r-- | licentia/source/program/licentia/license/addendum.lux (renamed from stdlib/source/program/licentia/license/addendum.lux) | 6 | ||||
-rw-r--r-- | licentia/source/program/licentia/license/assurance.lux (renamed from stdlib/source/program/licentia/license/assurance.lux) | 6 | ||||
-rw-r--r-- | licentia/source/program/licentia/license/black_list.lux (renamed from stdlib/source/program/licentia/license/black-list.lux) | 14 | ||||
-rw-r--r-- | licentia/source/program/licentia/license/commercial.lux (renamed from stdlib/source/program/licentia/license/commercial.lux) | 14 | ||||
-rw-r--r-- | licentia/source/program/licentia/license/copyright.lux (renamed from stdlib/source/program/licentia/license/copyright.lux) | 0 | ||||
-rw-r--r-- | licentia/source/program/licentia/license/definition.lux (renamed from stdlib/source/program/licentia/license/definition.lux) | 122 | ||||
-rw-r--r-- | licentia/source/program/licentia/license/distribution.lux (renamed from stdlib/source/program/licentia/license/distribution.lux) | 86 | ||||
-rw-r--r-- | licentia/source/program/licentia/license/extension.lux (renamed from stdlib/source/program/licentia/license/extension.lux) | 118 | ||||
-rw-r--r-- | licentia/source/program/licentia/license/grant.lux (renamed from stdlib/source/program/licentia/license/grant.lux) | 78 | ||||
-rw-r--r-- | licentia/source/program/licentia/license/liability.lux (renamed from stdlib/source/program/licentia/license/liability.lux) | 118 | ||||
-rw-r--r-- | licentia/source/program/licentia/license/limitation.lux (renamed from stdlib/source/program/licentia/license/limitation.lux) | 18 | ||||
-rw-r--r-- | licentia/source/program/licentia/license/miscellaneous.lux (renamed from stdlib/source/program/licentia/license/miscellaneous.lux) | 52 | ||||
-rw-r--r-- | licentia/source/program/licentia/license/notice.lux (renamed from stdlib/source/program/licentia/license/notice.lux) | 21 | ||||
-rw-r--r-- | licentia/source/program/licentia/license/submission.lux (renamed from stdlib/source/program/licentia/license/submission.lux) | 0 | ||||
-rw-r--r-- | licentia/source/program/licentia/license/term.lux (renamed from stdlib/source/program/licentia/license/term.lux) | 18 | ||||
-rw-r--r-- | licentia/source/program/licentia/license/time.lux (renamed from stdlib/source/program/licentia/license/time.lux) | 0 | ||||
-rw-r--r-- | licentia/source/program/licentia/output.lux (renamed from stdlib/source/program/licentia/output.lux) | 112 |
21 files changed, 457 insertions, 452 deletions
diff --git a/stdlib/source/program/licentia.lux b/licentia/source/program/licentia.lux index 896f74dab..57ed832e5 100644 --- a/stdlib/source/program/licentia.lux +++ b/licentia/source/program/licentia.lux @@ -13,15 +13,17 @@ (.module: [lux #* - [host (#+ import:)] + [ffi (#+ import:)] + [program (#+ program:)] + ["." debug] [abstract [monad (#+ do)]] [control - [remember (#+ to-do)] + [remember (#+ to_do)] ["." io (#+ IO) ("#\." monad)] ["." try (#+ Try)] ["." parser - ["." cli (#+ program:)] + ["<.>" cli] ["<.>" json]] [security ["!" capability]]] @@ -29,7 +31,8 @@ ["." maybe] ["." text ["%" format (#+ format)] - ["." encoding]] + [encoding + ["." utf8]]] [format ["." json]]] [world @@ -38,32 +41,32 @@ ["#." input] ["#." output]]) -(with-expansions [<expiry> "2021-04-01"] - (to-do <expiry> "Replace _.work with _.covered-work or _.licensed-work") - (to-do <expiry> "Create a short notice to add as a comment to each file in the _.work")) +(with_expansions [<expiry> "2022-04-01"] + (to_do <expiry> "Replace _.work with _.covered_work or _.licensed_work") + (to_do <expiry> "Create a short notice to add as a comment to each file in the _.work")) (import: java/lang/String ["#::." (trim [] java/lang/String)]) -(def: default-output-file "LICENSE") +(def: default_output_file "LICENSE") -(def: (success-message output) +(def: (success_message output) (-> Path Text) - (format "Your license has been made!" text.new-line + (format "Your license has been made!" text.new_line "Check the file " output ".")) -(program: [{input (cli.named "--input" cli.any)} - {output (parser.default ..default-output-file - (cli.named "--output" cli.any))}] +(program: [{input (<cli>.named "--input" <cli>.any)} + {output (parser.default ..default_output_file + (<cli>.named "--output" <cli>.any))}] (do io.monad [?done (: (IO (Try Any)) (do (try.with io.monad) [file (!.use (\ file.default file) [input]) blob (!.use (\ file content) []) document (io\wrap (do {! try.monad} - [raw-json (\ encoding.utf8 decode blob) - json (|> raw-json + [raw_json (\ utf8.codec decode blob) + json (|> raw_json (:coerce java/lang/String) java/lang/String::trim (:coerce Text) @@ -71,12 +74,12 @@ (|> json (<json>.run /input.license) (\ ! map /output.license)))) - output-file (: (IO (Try (File IO))) - (file.get-file io.monad file.default output))] - (!.use (\ output-file over-write) (\ encoding.utf8 encode document))))] - (wrap (log! (case ?done - (#try.Success _) - (success-message output) + output_file (: (IO (Try (File IO))) + (file.get_file io.monad file.default output))] + (!.use (\ output_file over_write) (\ utf8.codec encode document))))] + (wrap (debug.log! (case ?done + (#try.Success _) + (success_message output) - (#try.Failure message) - message))))) + (#try.Failure message) + message))))) diff --git a/stdlib/source/program/licentia/document.lux b/licentia/source/program/licentia/document.lux index b1bc20cce..95c14e231 100644 --- a/stdlib/source/program/licentia/document.lux +++ b/licentia/source/program/licentia/document.lux @@ -8,11 +8,11 @@ (def: #export (quote text) (-> Text Text) - (format text.double-quote text text.double-quote)) + (format text.double_quote text text.double_quote)) (def: #export (block content) (-> Text Text) - (format content text.new-line text.new-line)) + (format content text.new_line text.new_line)) (def: #export (plural singular) (-> Text Text) @@ -25,12 +25,12 @@ (def: #export paragraph (-> (List Text) Text) (|>> (list\map ..sentence) - (text.join-with text.new-line))) + (text.join_with text.new_line))) (template [<name> <word>] [(def: #export <name> (-> (List Text) Text) - (text.join-with (format ", " <word> " ")))] + (text.join_with (format ", " <word> " ")))] [or "or"] [and "and"] @@ -43,5 +43,5 @@ (def: #export (section value) (-> Section Text) - (format (block (get@ #title value)) + (format (..block (get@ #title value)) (get@ #content value))) diff --git a/stdlib/source/program/licentia/input.lux b/licentia/source/program/licentia/input.lux index 5ec07e32b..52205762d 100644 --- a/stdlib/source/program/licentia/input.lux +++ b/licentia/source/program/licentia/input.lux @@ -8,7 +8,8 @@ ["<.>" json (#+ Parser)]]] [data [text - ["%" format (#+ format)]] + ["%" format (#+ format)]]] + [math [number ["n" nat] ["i" int] @@ -20,7 +21,7 @@ Distribution Commercial Extension - Entity Black-List + Entity Black_List URL Attribution Addendum License) @@ -34,11 +35,11 @@ (<json>.field "name" <json>.string) (<json>.field "version" <json>.string)))) -(exception: #export (cannot-use-fractional-amount {amount Frac}) +(exception: #export (cannot_use_fractional_amount {amount Frac}) (exception.report ["Amount" (%.frac amount)])) -(exception: #export (cannot-use-negative-amount {amount Int}) +(exception: #export (cannot_use_negative_amount {amount Int}) (exception.report ["Amount" (%.int amount)])) @@ -47,14 +48,14 @@ (do <>.monad [amountF <json>.number #let [amountI (f.int amountF)] - _ (<>.assert (exception.construct cannot-use-fractional-amount amountF) + _ (<>.assert (exception.construct ..cannot_use_fractional_amount [amountF]) (f.= amountF (i.frac amountI))) - _ (<>.assert (exception.construct cannot-use-negative-amount amountI) + _ (<>.assert (exception.construct ..cannot_use_negative_amount [amountI]) (i.> +0 amountI))] (wrap (.nat amountI)))) -(exception: #export (invalid-period {period (Period Nat)}) +(exception: #export (invalid_period {period (Period Nat)}) (exception.report ["Start" (%.nat (get@ #time.start period))] ["End" (%.nat (get@ #time.end period))])) @@ -67,11 +68,11 @@ end (<json>.field "end" ..amount) #let [period {#time.start start #time.end end}] - _ (<>.assert (exception.construct invalid-period period) + _ (<>.assert (exception.construct ..invalid_period [period]) (n.<= end start))] (wrap period)))) -(def: copyright-holder +(def: copyright_holder (Parser copyright.Holder) (<json>.object ($_ <>.and @@ -121,8 +122,8 @@ (Parser Entity) <json>.string) -(def: black-list - (Parser Black-List) +(def: black_list + (Parser Black_List) (<json>.object ($_ <>.and (<json>.field "justification" (<json>.nullable <json>.string)) @@ -152,15 +153,15 @@ (Parser License) (<json>.object ($_ <>.and - (<json>.field "copyright-holders" (<json>.array (<>.many ..copyright-holder))) + (<json>.field "copyright-holders" (<json>.array (<>.many ..copyright_holder))) (<json>.field "identification" (<json>.nullable ..identification)) (<json>.field "termination" ..termination) (<json>.field "liability" ..liability) (<json>.field "distribution" ..distribution) (<json>.field "commercial" ..commercial) (<json>.field "extension" ..extension) - (<json>.field "black-lists" (<json>.array (<>.some ..black-list))) + (<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/stdlib/source/program/licentia/license.lux b/licentia/source/program/licentia/license.lux index c62c8419d..ad7328641 100644 --- a/stdlib/source/program/licentia/license.lux +++ b/licentia/source/program/licentia/license.lux @@ -9,54 +9,54 @@ #version Text}) (type: #export Termination - {#patent-retaliation? Bit - #termination-period Days - #grace-period Days}) + {#patent_retaliation? Bit + #termination_period Days + #grace_period Days}) (type: #export Liability - {#can-accept? Bit - #disclaim-high-risk? Bit}) + {#can_accept? Bit + #disclaim_high_risk? Bit}) (type: #export Distribution - {#can-re-license? Bit - #can-multi-license? Bit}) + {#can_re_license? Bit + #can_multi_license? Bit}) (type: #export Commercial - {#can-sell? Bit - #require-contributor-credit? Bit - #allow-contributor-endorsement? Bit}) + {#can_sell? Bit + #require_contributor_credit? Bit + #allow_contributor_endorsement? Bit}) (type: #export Extension - {#same-license? Bit - #must-be-distinguishable? Bit - #notification-period (Maybe (Period Months)) - #must-describe-modifications? Bit}) + {#same_license? Bit + #must_be_distinguishable? Bit + #notification_period (Maybe (Period Months)) + #must_describe_modifications? Bit}) (type: #export Entity Text) -(type: #export Black-List +(type: #export Black_List {#justification (Maybe Text) #entities (List Entity)}) (type: #export URL Text) (type: #export Attribution - {#copyright-notice Text + {#copyright_notice Text #phrase (Maybe Text) #url URL #image (Maybe URL)}) (type: #export Addendum - {#commons-clause? Bit}) + {#commons_clause? Bit}) (type: #export License - {#copyright-holders (List /copyright.Holder) + {#copyright_holders (List /copyright.Holder) #identification (Maybe Identification) #termination Termination #liability Liability #distribution Distribution #commercial Commercial #extension Extension - #black-lists (List Black-List) + #black_lists (List Black_List) #attribution (Maybe Attribution) #addendum Addendum}) diff --git a/stdlib/source/program/licentia/license/addendum.lux b/licentia/source/program/licentia/license/addendum.lux index 7e467c630..e4a8d6364 100644 --- a/stdlib/source/program/licentia/license/addendum.lux +++ b/licentia/source/program/licentia/license/addendum.lux @@ -8,7 +8,7 @@ ["$" document]]]) ## https://commonsclause.com/ -(def: #export commons-clause +(def: #export commons_clause Text (format ($.block "The Software is provided to you by the Licensor under the License, as defined below, subject to the following condition.") ($.block "Without limiting other conditions in the License, the grant of rights under the License will not include, and the License does not grant to you, the right to Sell the Software.") @@ -23,6 +23,6 @@ "")] ["“Commons Clause” License Condition v1.0" - (get@ #//.commons-clause? value) - ..commons-clause] + (get@ #//.commons_clause? value) + ..commons_clause] ))))) diff --git a/stdlib/source/program/licentia/license/assurance.lux b/licentia/source/program/licentia/license/assurance.lux index 155472cd1..5c1adfef7 100644 --- a/stdlib/source/program/licentia/license/assurance.lux +++ b/licentia/source/program/licentia/license/assurance.lux @@ -15,11 +15,11 @@ " are its original creation(s) or it has sufficient rights to grant the rights to its " ($.plural _.contribution) " conveyed by " _.license))) -(def: #export fair-use - (let [copyright-doctrines (: (List Text) +(def: #export fair_use + (let [copyright_doctrines (: (List Text) (list "fair use" "fair dealing" "other equivalents"))] ($.sentence (format _.license " is not intended to limit any rights " _.recipient - " has under applicable copyright doctrines of " ($.or copyright-doctrines))))) + " has under applicable copyright doctrines of " ($.or copyright_doctrines))))) diff --git a/stdlib/source/program/licentia/license/black-list.lux b/licentia/source/program/licentia/license/black_list.lux index 14dcdfe91..d260f1865 100644 --- a/stdlib/source/program/licentia/license/black-list.lux +++ b/licentia/source/program/licentia/license/black_list.lux @@ -6,7 +6,7 @@ ["%" format (#+ format)]] [collection ["." list ("#\." functor)]]]] - ["." // (#+ Entity Black-List) + ["." // (#+ Entity Black_List) ["_" term] [// ["$" document]]]) @@ -15,17 +15,17 @@ (-> Entity Text) %.text) -(def: #export (black-list black-list) - (-> Black-List Text) +(def: #export (black_list black_list) + (-> Black_List Text) (let [scope (format "The rights granted under " _.license) effect "shall not be granted to the following entities, or any subsidiary thereof" - justification (|> black-list + justification (|> black_list (get@ #//.justification) (maybe\map (|>> (format ", due to "))) (maybe.default "")) - entities (|> black-list + entities (|> black_list (get@ #//.entities) (list\map ..entity) - (text.join-with text.new-line))] - (format scope " " effect justification ":" text.new-line + (text.join_with text.new_line))] + (format scope " " effect justification ":" text.new_line entities))) diff --git a/stdlib/source/program/licentia/license/commercial.lux b/licentia/source/program/licentia/license/commercial.lux index e044baa43..a17acdbb3 100644 --- a/stdlib/source/program/licentia/license/commercial.lux +++ b/licentia/source/program/licentia/license/commercial.lux @@ -8,21 +8,21 @@ [// ["$" document]]]) -(def: #export cannot-sell +(def: #export cannot_sell (let [preamble (format "Without limiting other conditions in " _.license) - direct-condition (format "the grant of rights under " _.license + direct_condition (format "the grant of rights under " _.license " will not include, and does not grant to " _.recipient ", the right to " _.sell " " _.work) - derivative-condition (format "or any " _.derivative-work)] + derivative_condition (format "or any " _.derivative_work)] ($.sentence (format preamble - ", " direct-condition - ", " derivative-condition)))) + ", " direct_condition + ", " derivative_condition)))) -(def: #export require-contributor-attribution +(def: #export require_contributor_attribution ($.sentence (format "All advertising materials mentioning features or use of " _.work " must include an acknowledgement of the authorship of every " _.contributor))) -(def: #export disallow-contributor-endorsement +(def: #export disallow_contributor_endorsement (let [subject (format "The name of no " _.contributor) capability "endorse or promote products" source (format "any " _.extension) diff --git a/stdlib/source/program/licentia/license/copyright.lux b/licentia/source/program/licentia/license/copyright.lux index 872af9d2b..872af9d2b 100644 --- a/stdlib/source/program/licentia/license/copyright.lux +++ b/licentia/source/program/licentia/license/copyright.lux diff --git a/stdlib/source/program/licentia/license/definition.lux b/licentia/source/program/licentia/license/definition.lux index 6739039dc..e93230b33 100644 --- a/stdlib/source/program/licentia/license/definition.lux +++ b/licentia/source/program/licentia/license/definition.lux @@ -10,10 +10,10 @@ {#term Text #meaning Text}) -(def: not-a-contribution-notice - (format text.double-quote "Not a Contribution" text.double-quote)) +(def: not_a_contribution_notice + (format text.double_quote "Not a Contribution" text.double_quote)) -(def: #export patent-rights +(def: #export patent_rights (List Text) (list "make" "have made" @@ -23,7 +23,7 @@ "import" "transfer")) -(def: commercial-services +(def: commercial_services (List Text) (let [services (: (-> Text Text) (function (_ type) @@ -32,7 +32,7 @@ (services "consulting") (services "support")))) -(def: individual-capacities +(def: individual_capacities (List Text) (list "officer" "employee" @@ -40,7 +40,7 @@ "independent contractor" "agent of a corporation, business or organization (commercial or non-commercial)")) -(def: covered-work-description +(def: covered_work_description "work of authorship") (template [<name> <term> <meaning>] @@ -55,7 +55,7 @@ [licensable "Licensable" ($.paragraph (list (format "having the right to grant any and all of the rights conveyed by " (get@ #term license))))] - [legal-entity "Legal Entity" + [legal_entity "Legal Entity" (let [abilities (: (List Text) (list "to enter into contracts" "to sue" @@ -63,38 +63,38 @@ ($.paragraph (list (format "any human or non-human entity that is recognized as having privileges and obligations, such as having the ability " ($.and abilities)))))] [recipient "Recipient" - ($.paragraph (list (format "a " (get@ #term legal-entity) " exercising permissions by " (get@ #term license))))] + ($.paragraph (list (format "a " (get@ #term legal_entity) " exercising permissions by " (get@ #term license))))] [licensor "The Licensor" - ($.paragraph (list (format "the copyright owner granting " (get@ #term license) ", or a " (get@ #term legal-entity) " authorized by the copyright owner")))] + ($.paragraph (list (format "the copyright owner granting " (get@ #term license) ", or a " (get@ #term legal_entity) " authorized by the copyright owner")))] - [source-code-form "Source Code Form" - ($.paragraph (list (format "the preferred form of the " ..covered-work-description " in order to make modifications to it")))] + [source_code_form "Source Code Form" + ($.paragraph (list (format "the preferred form of the " ..covered_work_description " in order to make modifications to it")))] - [object-form "Object Form" - ($.paragraph (list (format "any form produced by transforming a " (get@ #term source-code-form) ", including but not limited to compiled code and transpiled code")))] + [object_form "Object Form" + ($.paragraph (list (format "any form produced by transforming a " (get@ #term source_code_form) ", including but not limited to compiled code and transpiled code")))] [work "The Work" - ($.paragraph (list (format "the " ..covered-work-description - ", whether in a " (get@ #term source-code-form) - " or in an " (get@ #term object-form) + ($.paragraph (list (format "the " ..covered_work_description + ", whether in a " (get@ #term source_code_form) + " or in an " (get@ #term object_form) ", made available under " (get@ #term license) - ", as indicated by a copyright notice that is included in or attached to the " ..covered-work-description)))] + ", as indicated by a copyright notice that is included in or attached to the " ..covered_work_description)))] - [derivative-work "Derivative Work" - ($.paragraph (list (format "any work, whether in a " (get@ #term source-code-form) - " or in an " (get@ #term object-form) + [derivative_work "Derivative Work" + ($.paragraph (list (format "any work, whether in a " (get@ #term source_code_form) + " or in an " (get@ #term object_form) ", that is based on (or derived from) " (get@ #term work) - " and which represents an original " ..covered-work-description)))] + " and which represents an original " ..covered_work_description)))] [submission "Submission" - (let [forms-of-communication (: (List Text) + (let [forms_of_communication (: (List Text) (list "electronic" "verbal" "written"))] - ($.paragraph (list (format "any form of " ($.or forms-of-communication) " communication sent to " (get@ #term licensor) + ($.paragraph (list (format "any form of " ($.or forms_of_communication) " communication sent to " (get@ #term licensor) ", or its representatives, for the purpose of discussing and improving " (get@ #term work) - ", but excluding communication that is designated in writing by the copyright owner as " not-a-contribution-notice))))] + ", but excluding communication that is designated in writing by the copyright owner as " not_a_contribution_notice))))] [modification "Modification" (let [alteration "any addition to, or deletion from, the substance or structure of" @@ -105,7 +105,7 @@ (format "any " object " which replaces or otherwise alters the original functionality of "(get@ #term work) " at runtime")))] ($.paragraph (list (format alteration " " ($.or targets)))))] - [required-component "Required Component" + [required_component "Required Component" (let [possibilities (: (List Text) (list "text" "program" @@ -116,59 +116,59 @@ "other work"))] ($.paragraph (list (format "any " ($.or possibilities) " created by " (get@ #term recipient) - " which is required by a third party to successfully install and run a " (get@ #term derivative-work) + " which is required by a third party to successfully install and run a " (get@ #term derivative_work) " by " (get@ #term recipient)))))] [extension "Extension" (let [possibilities (: (List Text) (list (get@ #term modification) - (get@ #term derivative-work) - (get@ #term required-component)))] + (get@ #term derivative_work) + (get@ #term required_component)))] ($.paragraph (list (format "any " ($.or possibilities)))))] [contribution "Contribution" - ($.paragraph (list (format "any " covered-work-description ", including the original version of " (get@ #term work) + ($.paragraph (list (format "any " covered_work_description ", including the original version of " (get@ #term work) " and any " (get@ #term extension) " to " (get@ #term work) ", that is intentionally communicated as a " (get@ #term submission) " to " (get@ #term licensor) " for inclusion in " (get@ #term work) " by the copyright owner" - ", or by a " (get@ #term legal-entity) " authorized to submit on behalf of the copyright owner")))] + ", or by a " (get@ #term legal_entity) " authorized to submit on behalf of the copyright owner")))] [contributor "Contributor" ($.paragraph (list (format (get@ #term licensor) - " or any " (get@ #term legal-entity) + " or any " (get@ #term legal_entity) " on behalf of whom a " (get@ #term contribution) " has been received by " (get@ #term licensor) ", and subsequently incorporated within " (get@ #term work))))] - [patent-claim (format "Patent Claim Of A " (get@ #term contributor)) - (let [claim-types (: (List Text) + [patent_claim (format "Patent Claim Of A " (get@ #term contributor)) + (let [claim_types (: (List Text) (list "method" "process" "apparatus"))] - ($.paragraph (list (format "any patent claim(s), including without limitation " ($.and claim-types) " claims, in any patent " + ($.paragraph (list (format "any patent claim(s), including without limitation " ($.and claim_types) " claims, in any patent " (get@ #term licensable) " by such " (get@ #term contributor) " that would be infringed, but for the grant of " (get@ #term license) - ", to " ($.or patent-rights) " its " (get@ #term contribution)))))] + ", to " ($.or patent_rights) " its " (get@ #term contribution)))))] - [secondary-license "Secondary License" + [secondary_license "Secondary License" ($.paragraph (list (format "any license for which compliance does not imply or require violating the terms of " (get@ #term license))))] [sell "Sell" ($.paragraph (list (format "practicing any or all of the rights granted to " (get@ #term recipient) " under " (get@ #term license) " to provide to third parties, for a fee or other consideration " - "(including without limitation fees for " ($.or commercial-services) + "(including without limitation fees for " ($.or commercial_services) " related to "(get@ #term work) ")" ", a product or service whose value derives, entirely or substantially, from the functionality of " (get@ #term work))))] - [personal-use "Personal Use" - (let [valid-purposes (: (List Text) + [personal_use "Personal Use" + (let [valid_purposes (: (List Text) (list "personal" "private" "non-commercial"))] - ($.paragraph (list (format "use of " (get@ #term work) " by an individual solely for his or her " ($.and valid-purposes) " purposes") - (format "An individual's use of " (get@ #term work) " in his or her capacity as an " ($.or individual-capacities) " does not qualify"))))] + ($.paragraph (list (format "use of " (get@ #term work) " by an individual solely for his or her " ($.and valid_purposes) " purposes") + (format "An individual's use of " (get@ #term work) " in his or her capacity as an " ($.or individual_capacities) " does not qualify"))))] [serve "Serve" ($.paragraph (list (format "to deliver " (get@ #term work) @@ -180,36 +180,36 @@ ($.paragraph (list (format "investigation or experimentation for the purpose of understanding the nature and limits of " (get@ #term work) " and its potential uses")))] [deploy "Deploy" - (let [deployment-types (: (List Text) + (let [deployment_types (: (List Text) (list "use" (get@ #term serve) "sublicense" "distribute")) - sub-licensing (: (-> Text Text) + sub_licensing (: (-> Text Text) (function (_ type) (format type " sublicensing"))) - third-party-interactions (: (List Text) - (list (sub-licensing "direct") - (sub-licensing "indirect") + third_party_interactions (: (List Text) + (list (sub_licensing "direct") + (sub_licensing "indirect") "distribution")) - basic-definition (format "to " ($.or deployment-types) + basic_definition (format "to " ($.or deployment_types) " " (get@ #term work) " other than for internal " (get@ #term research) - " and/or " (get@ #term personal-use) + " and/or " (get@ #term personal_use) " by " (get@ #term recipient)) examples (format "any and all internal use or distribution of " (get@ #term work) " within a business or organization in which " (get@ #term recipient) " participates") - exceptions (format "for " (get@ #term research) " and/or " (get@ #term personal-use))] - ($.paragraph (list (format basic-definition + exceptions (format "for " (get@ #term research) " and/or " (get@ #term personal_use))] + ($.paragraph (list (format basic_definition ", and includes without limitation, " examples ", other than " exceptions - ", as well as " ($.or third-party-interactions) + ", as well as " ($.or third_party_interactions) " of " (get@ #term work) " by " (get@ #term recipient) " to any third party in any form or manner"))))] - [electronic-distribution-mechanism "Electronic Distribution Mechanism" + [electronic_distribution_mechanism "Electronic Distribution Mechanism" ($.paragraph (list "a mechanism generally accepted in the software development community for the electronic transfer of data, such as download from an FTP server or web site, where such mechanism is publicly accessible"))] ) @@ -217,24 +217,24 @@ (List Definition) (list license licensable - legal-entity + legal_entity recipient licensor - source-code-form - object-form + source_code_form + object_form work - derivative-work + derivative_work submission modification - required-component + required_component extension contribution contributor - patent-claim - secondary-license + patent_claim + secondary_license sell - personal-use + personal_use serve research deploy - electronic-distribution-mechanism)) + electronic_distribution_mechanism)) diff --git a/stdlib/source/program/licentia/license/distribution.lux b/licentia/source/program/licentia/license/distribution.lux index f911623a0..8ec4e9bae 100644 --- a/stdlib/source/program/licentia/license/distribution.lux +++ b/licentia/source/program/licentia/license/distribution.lux @@ -23,90 +23,90 @@ (notices "limitation of liability") (notices "other")))) -(def: #export source-code-form - (let [on-license-propagation (let [coverage (format "All distribution of " _.work " in " _.source-code-form) - with-contributions (format "including any " ($.plural _.contribution) +(def: #export source_code_form + (let [on_license_propagation (let [coverage (format "All distribution of " _.work " in " _.source_code_form) + with_contributions (format "including any " ($.plural _.contribution) " that " _.recipient " creates") - same-license (format "must be under the terms of " _.license)] - (format coverage ", " with-contributions ", " same-license)) - on-license-access (let [responsibility-to-inform (format _.recipient - " must inform recipients that the " _.source-code-form + same_license (format "must be under the terms of " _.license)] + (format coverage ", " with_contributions ", " same_license)) + on_license_access (let [responsibility_to_inform (format _.recipient + " must inform recipients that the " _.source_code_form " of " _.work " is governed by the terms of " _.license) - license-copy (format "and how they can obtain a copy of " _.license)] - (format responsibility-to-inform ", " license-copy)) - on-license-immutability (format _.recipient - " may not attempt to alter or restrict the recipients’ rights in the " _.source-code-form + license_copy (format "and how they can obtain a copy of " _.license)] + (format responsibility_to_inform ", " license_copy)) + on_license_immutability (format _.recipient + " may not attempt to alter or restrict the recipients’ rights in the " _.source_code_form ", as specified in " _.license) - on-notice-retention (let [obligation (format _.recipient " must retain") - location (format "in the " _.source-code-form + on_notice_retention (let [obligation (format _.recipient " must retain") + location (format "in the " _.source_code_form " of any " _.extension " that " _.recipient " distributes") - what (format "all " ($.and notices) " from the " _.source-code-form " of " _.work) + what (format "all " ($.and notices) " from the " _.source_code_form " of " _.work) exclusion ($.or (list (format "those notices that do not pertain to any part of the " _.extension) "those notices that contain known factual inaccuracies"))] (format obligation ", " location ", " what ", excluding " exclusion)) - on-additional-notices (let [right (format _.recipient + on_additional_notices (let [right (format _.recipient " may add additional "($.and notices) " within an " _.extension " that " _.recipient " distributes") constraint (format "such additional " ($.and notices) " cannot be construed as modifying " _.license)] (format right ", provided that " constraint))] - ($.paragraph (list on-license-propagation - on-license-access - on-license-immutability - on-notice-retention - on-additional-notices)))) + ($.paragraph (list on_license_propagation + on_license_access + on_license_immutability + on_notice_retention + on_additional_notices)))) -(def: #export object-form - (let [on-responsibility (let [condition (format "If " _.recipient +(def: #export object_form + (let [on_responsibility (let [condition (format "If " _.recipient " distributes " _.work - " in " _.object-form) - responsibility (let [availability-responsibility (format _.work " must also be made available in " _.source-code-form) - source-code-responsibility (format _.recipient - " must inform recipients of the " _.object-form - " how they can obtain a copy of such " _.source-code-form) + " in " _.object_form) + responsibility (let [availability_responsibility (format _.work " must also be made available in " _.source_code_form) + source_code_responsibility (format _.recipient + " must inform recipients of the " _.object_form + " how they can obtain a copy of such " _.source_code_form) constraints "by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient"] - (format availability-responsibility ", and " source-code-responsibility " " constraints))] + (format availability_responsibility ", and " source_code_responsibility " " constraints))] (format condition " then " responsibility)) - on-licensing (format _.recipient - " may distribute such " _.object-form + on_licensing (format _.recipient + " may distribute such " _.object_form " under the terms of "_.license)] - ($.paragraph (list on-responsibility - on-licensing)))) + ($.paragraph (list on_responsibility + on_licensing)))) -(def: #export allow-re-licensing - (let [can-license (format _.recipient +(def: #export allow_re_licensing + (let [can_license (format _.recipient " may create and distribute an " _.extension " under terms " _.recipient " chooses") requirement (format _.recipient " also comply with the requirements of " _.license " for the " _.work)] - (format can-license ", " "provided that " requirement))) + (format can_license ", " "provided that " requirement))) -(def: #export allow-multi-licensing - (let [condition (format "the " _.extension " is a combination of " _.work " with a work governed by one or more " ($.plural _.secondary-license)) +(def: #export allow_multi_licensing + (let [condition (format "the " _.extension " is a combination of " _.work " with a work governed by one or more " ($.plural _.secondary_license)) permission (let [relicensing (format _.license " permits " _.recipient " to additionally distribute " _.work - " under the terms of such " ($.plural _.secondary-license)) + " under the terms of such " ($.plural _.secondary_license)) distribution (format "so that the recipient of the " _.extension " may, at their option, further distribute " _.work " under the terms of either " _.license - " or such " ($.plural _.secondary-license))] + " or such " ($.plural _.secondary_license))] (format relicensing ", " distribution))] (format "If " condition ", " permission))) (def: #export (extension distribution) (-> Distribution Text) ($.paragraph ($_ list\compose - (if (get@ #//.can-re-license? distribution) - (list allow-re-licensing) + (if (get@ #//.can_re_license? distribution) + (list allow_re_licensing) (list)) - (if (get@ #//.can-multi-license? distribution) - (list allow-multi-licensing) + (if (get@ #//.can_multi_license? distribution) + (list allow_multi_licensing) (list))))) diff --git a/stdlib/source/program/licentia/license/extension.lux b/licentia/source/program/licentia/license/extension.lux index f808a8913..c6b368d33 100644 --- a/stdlib/source/program/licentia/license/extension.lux +++ b/licentia/source/program/licentia/license/extension.lux @@ -10,9 +10,9 @@ [// ["$" document]]]) -(def: #export sharing-requirement +(def: #export sharing_requirement (List Text) - (let [on-extension (let [constraint (let [because "In consideration of, and as an express condition to, " + (let [on_extension (let [constraint (let [because "In consideration of, and as an express condition to, " source (format "the licenses granted to " _.recipient " under " _.license)] (format because " " source)) @@ -22,55 +22,55 @@ " creates or to which " _.recipient " contributes are governed by the terms of " _.license)] (format constraint ", " duty)) - on-deployment (format _.recipient " may only " _.deploy + on_deployment (format _.recipient " may only " _.deploy " an " _.extension " that " _.recipient " creates under the terms of " _.license) - on-sharing (format _.recipient + on_sharing (format _.recipient " hereby grant to " _.licensor - " and all third parties a " ($.and grant.grant-characteristics) + " and all third parties a " ($.and grant.grant_characteristics) " license under those intellectual property rights " _.recipient - " owns or controls to " ($.or grant.copyright-grant-rights) + " owns or controls to " ($.or grant.copyright_grant_rights) " " _.work " in any form") - on-license-propagation (format _.recipient + on_license_propagation (format _.recipient " must include a copy of " _.license " or directions on how to obtain a copy with every copy of an " _.extension " " _.recipient " distributes") - on-license-protection (format _.recipient - " agrees not to offer or impose any terms on any " _.source-code-form - " or " _.object-form + on_license_protection (format _.recipient + " agrees not to offer or impose any terms on any " _.source_code_form + " or " _.object_form " of the " _.work ", or its " _.extension " that alter or restrict the applicable version of " _.license " or the recipients' rights hereunder")] - (list on-extension - on-deployment - on-sharing - on-license-propagation - on-license-protection))) + (list on_extension + on_deployment + on_sharing + on_license_propagation + on_license_protection))) -(def: #export license-conflict-resolution +(def: #export license_conflict_resolution (List Text) - (let [on-other-licenses (let [circumstance (format "Where any portion of an " _.extension + (let [on_other_licenses (let [circumstance (format "Where any portion of an " _.extension " created by " _.recipient) consequence "fall under the terms of another license" duty "the terms of that license should be honored"] (format circumstance " " consequence ", " duty)) - on-this-license (format "However " _.recipient + on_this_license (format "However " _.recipient " must also make the " _.extension " available under " _.license) - on-licensor-judgement (let [condition (format "the terms of " _.license " continue to conflict with the terms of the other license") + on_licensor_judgement (let [condition (format "the terms of " _.license " continue to conflict with the terms of the other license") right (format _.recipient " may write " _.licensor " for permission to resolve the conflict") characteristic (format "a fashion that remains consistent with the intent of " _.license)] (format "If " condition ", " right " in " characteristic)) - on-licensor-discretion (format "Such permission will be granted at the sole discretion of " _.licensor)] - (list on-other-licenses - on-this-license - on-licensor-judgement - on-licensor-discretion))) + on_licensor_discretion (format "Such permission will be granted at the sole discretion of " _.licensor)] + (list on_other_licenses + on_this_license + on_licensor_judgement + on_licensor_discretion))) -(def: #export distinctness-requirement +(def: #export distinctness_requirement ($.paragraph (list (format "Any " _.extension " " _.recipient " does make and " _.deploy @@ -78,72 +78,72 @@ " that the " _.extension " is by " _.recipient)))) -(def: news-sources +(def: news_sources (List Text) (list "news groups" "mailing lists" "weblogs" "other sites")) -(def: #export (notification-requirement [start end]) +(def: #export (notification_requirement [start end]) (-> (Period Months) Text) - (let [on-availability (format _.recipient - " must notify the software community of the availability of the " _.source-code-form + (let [on_availability (format _.recipient + " must notify the software community of the availability of the " _.source_code_form " to any " _.extension " created by " _.recipient " within " (%.nat start) " month(s) of the date " _.recipient " initially does " _.deploy ", and include in such notification a description of the " _.extension - ", and instructions on how to acquire the " _.source-code-form - " via an " _.electronic-distribution-mechanism) - on-duration (format "The " _.source-code-form - " must remain available via an " _.electronic-distribution-mechanism + ", and instructions on how to acquire the " _.source_code_form + " via an " _.electronic_distribution_mechanism) + on_duration (format "The " _.source_code_form + " must remain available via an " _.electronic_distribution_mechanism " for no less than " (%.nat end) " month(s) after the date " _.recipient " ceases to " _.deploy) - on-responsibility (format _.recipient - " is responsible for ensuring that the " _.source-code-form + on_responsibility (format _.recipient + " is responsible for ensuring that the " _.source_code_form " to each " _.extension " " _.recipient " does " _.deploy - " remains available even if the " _.electronic-distribution-mechanism + " remains available even if the " _.electronic_distribution_mechanism " is maintained by a third party") - on-costs (format _.recipient - " may not charge a fee for any copy of the " _.source-code-form + on_costs (format _.recipient + " may not charge a fee for any copy of the " _.source_code_form " in excess of the actual cost of duplication and distribution of said copy that " _.recipient " incurs") - on-changes (format "Should such instructions change, " _.recipient + on_changes (format "Should such instructions change, " _.recipient " must notify the software community of revised instructions within " (%.nat start) " month(s) of the date of change") - on-accesibility (format _.recipient - " must provide notification by posting to appropriate " ($.or news-sources) + on_accesibility (format _.recipient + " must provide notification by posting to appropriate " ($.or news_sources) " where a publicly accessible search engine would reasonably be expected to index a post in relationship to queries regarding " _.work " and/or an " _.extension " created by " _.recipient)] - ($.paragraph (list on-availability - on-duration - on-responsibility - on-costs - on-changes - on-accesibility)))) + ($.paragraph (list on_availability + on_duration + on_responsibility + on_costs + on_changes + on_accesibility)))) -(def: #export description-requirement +(def: #export description_requirement Text - (let [on-duty (let [basic (format _.recipient + (let [on_duty (let [basic (format _.recipient " must cause any " _.modification " that " _.recipient " creates, or to which " _.recipient - " contributes, to be documented in the " _.source-code-form) - modification-types (: (List Text) + " contributes, to be documented in the " _.source_code_form) + modification_types (: (List Text) (list "additions" "changes" "deletions")) - details (format "clearly describing the " ($.and modification-types) + details (format "clearly describing the " ($.and modification_types) " that " _.recipient " made")] (format basic ", " details)) - on-notice-location (let [statement-locations (: (List Text) - (list (format "in the " _.source-code-form) + on_notice_location (let [statement_locations (: (List Text) + (list (format "in the " _.source_code_form) (format "in any notice displayed by " _.work " " _.recipient " distributes") @@ -155,12 +155,12 @@ " and include the names of " _.licensor " and any " _.contributor " to " _.work - " " ($.and statement-locations))) - on-notice-preservation (format _.recipient + " " ($.and statement_locations))) + on_notice_preservation (format _.recipient " may not modify or delete any pre-existing copyright notices, change notices or the text of " _.license " in " _.work " without written permission of " _.licensor " or the respective " _.contributor)] - ($.paragraph (list on-duty - on-notice-location - on-notice-preservation)))) + ($.paragraph (list on_duty + on_notice_location + on_notice_preservation)))) diff --git a/stdlib/source/program/licentia/license/grant.lux b/licentia/source/program/licentia/license/grant.lux index 0f45f3592..c79fcee09 100644 --- a/stdlib/source/program/licentia/license/grant.lux +++ b/licentia/source/program/licentia/license/grant.lux @@ -10,12 +10,12 @@ [// ["$" document]]]) -(def: grant-header +(def: grant_header (format "Subject to the terms and conditions of " _.license ", each " _.contributor " hereby grants to " _.recipient)) -(def: #export grant-characteristics +(def: #export grant_characteristics (List Text) (list "perpetual" "world-wide" @@ -24,7 +24,7 @@ "royalty-free" "irrevocable")) -(def: #export copyright-grant-rights +(def: #export copyright_grant_rights (List Text) (list "use" "reproduce" @@ -36,23 +36,23 @@ "distribute")) (def: #export copyright - ($.sentence (format grant-header " a " ($.and ..grant-characteristics) - " copyright license to " ($.or ..copyright-grant-rights) + ($.sentence (format grant_header " a " ($.and ..grant_characteristics) + " copyright license to " ($.or ..copyright_grant_rights) " " _.work " and such an " _.extension - " in a " _.source-code-form - " or an " _.object-form))) + " in a " _.source_code_form + " or an " _.object_form))) (def: #export (patent retaliation?) (-> Bit Text) - (let [grant (format grant-header " a " ($.and ..grant-characteristics) - " patent license to " ($.or definition.patent-rights) " " + (let [grant (format grant_header " a " ($.and ..grant_characteristics) + " patent license to " ($.or definition.patent_rights) " " _.work - ", where such license applies only to any " _.patent-claim + ", where such license applies only to any " _.patent_claim " that is necessarily infringed by their " ($.plural _.contribution) " alone or by combination of their " ($.plural _.contribution) " with " _.work) - retaliation-clause (format "If " _.recipient " institutes patent litigation against any " _.legal-entity + retaliation_clause (format "If " _.recipient " institutes patent litigation against any " _.legal_entity " (including a cross-claim or counterclaim in a lawsuit) alleging that " _.work " or a " _.contribution " incorporated within " _.work " constitutes direct or contributory patent infringement" @@ -62,7 +62,7 @@ " shall terminate as of the date such litigation is filed")] ($.paragraph (list& grant (if retaliation? - (list retaliation-clause) + (list retaliation_clause) (list)))))) (def: #export date @@ -72,53 +72,53 @@ " on the date the " _.contributor " first distributes such " _.contribution))) -(def: restoration-scope "an ongoing basis") +(def: restoration_scope "an ongoing basis") -(def: #export (grant-restoration-clause termination-period) +(def: #export (grant_restoration_clause termination_period) (-> Days Text) - (let [restoration-condition (format _.recipient " becomes compliant") - restored-grants (format "the rights granted under " _.license + (let [restoration_condition (format _.recipient " becomes compliant") + restored_grants (format "the rights granted under " _.license " from a particular " _.contributor) - invalidation-condition (format "such " _.contributor + invalidation_condition (format "such " _.contributor " explicitly and finally terminates the grants to " _.recipient) - complaint-period-condition (format "such " _.contributor + complaint_period_condition (format "such " _.contributor " fails to notify " _.recipient - " of the non-compliance by some reasonable means prior to " (%.nat termination-period) + " of the non-compliance by some reasonable means prior to " (%.nat termination_period) " " ($.plural "day") " after " _.recipient " has come back into compliance")] - (format "However, if " restoration-condition ", then " restored-grants " are reinstated provisionally" - ", unless and until " invalidation-condition - ", and on " ..restoration-scope ", if " complaint-period-condition))) + (format "However, if " restoration_condition ", then " restored_grants " are reinstated provisionally" + ", unless and until " invalidation_condition + ", and on " ..restoration_scope ", if " complaint_period_condition))) -(def: #export (grace-period-clause grace-period) +(def: #export (grace_period_clause grace_period) (-> Days Text) - (let [the-grants (format "grants to " _.recipient " from a particular " _.contributor) - automatic-restoration-conditions (let [notification (format "such " _.contributor + (let [the_grants (format "grants to " _.recipient " from a particular " _.contributor) + automatic_restoration_conditions (let [notification (format "such " _.contributor " notifies " _.recipient " of the non-compliance by some reasonable means") - first-offense (format "this is the first time " _.recipient + first_offense (format "this is the first time " _.recipient " has received notice of non-compliance with " _.license " from such " _.contributor) - prompt-compliance (format _.recipient - " becomes compliant prior to " (%.nat grace-period) + prompt_compliance (format _.recipient + " becomes compliant prior to " (%.nat grace_period) " " ($.plural "day") " after reception of the notice")] ($.and (list notification - first-offense - prompt-compliance)))] - (format "Moreover, " the-grants - " are reinstated on " ..restoration-scope - " if " automatic-restoration-conditions))) + first_offense + prompt_compliance)))] + (format "Moreover, " the_grants + " are reinstated on " ..restoration_scope + " if " automatic_restoration_conditions))) -(def: #export (termination termination-period grace-period) +(def: #export (termination termination_period grace_period) (-> Days Days Text) - (let [on-violation-of-terms (let [what (format "The rights granted under " _.license) + (let [on_violation_of_terms (let [what (format "The rights granted under " _.license) when (format _.recipient " fails to comply with any of its terms")] (format what " will terminate automatically if " when))] - ($.paragraph (list on-violation-of-terms - (..grant-restoration-clause termination-period) - (..grace-period-clause grace-period))))) + ($.paragraph (list on_violation_of_terms + (..grant_restoration_clause termination_period) + (..grace_period_clause grace_period))))) -(def: #export no-retroactive-termination +(def: #export no_retroactive_termination (let [situation "In the event of termination" coverage "all end user license agreements" exclusions "(excluding licenses to distributors and resellers)" diff --git a/stdlib/source/program/licentia/license/liability.lux b/licentia/source/program/licentia/license/liability.lux index 51b98ad40..1ad88c43d 100644 --- a/stdlib/source/program/licentia/license/liability.lux +++ b/licentia/source/program/licentia/license/liability.lux @@ -8,13 +8,13 @@ [// ["$" document]]]) -(def: warranty-communications +(def: warranty_communications (List Text) (list "expressed" "implied" "statutory")) -(def: work-disclamers +(def: work_disclamers (List Text) (list "free of defects" "merchantable" @@ -28,38 +28,38 @@ "correction")) (def: #export warranty - (let [on-basics (let [applicability-escape "Unless required by applicable law or agreed to in writing" - work-provisioning (format _.licensor + (let [on_basics (let [applicability_escape "Unless required by applicable law or agreed to in writing" + work_provisioning (format _.licensor " provides " _.work ", and each " _.contributor " provides its " ($.plural _.contribution))] - (format applicability-escape ", " - work-provisioning + (format applicability_escape ", " + work_provisioning " under " _.license " on an " ($.quote "as is") - " basis, without warranty or condition of any kind, either " ($.or warranty-communications) + " basis, without warranty or condition of any kind, either " ($.or warranty_communications) " including, without limitation, any warranties or conditions that " _.work - " is " ($.or work-disclamers))) - on-distribution (format _.recipient + " is " ($.or work_disclamers))) + on_distribution (format _.recipient " is solely responsible for determining the appropriateness of using or redistributing " _.work) - on-risk (format "The entire risk as to the quality and performance of " _.work + on_risk (format "The entire risk as to the quality and performance of " _.work " is with " _.recipient) - on-fixes (format "Should " _.work + on_fixes (format "Should " _.work " prove defective in any respect, " _.recipient ", not any " _.contributor ", assumes the cost of any necessary " ($.or fixes)) - on-importance (format "This disclaimer of warranty constitutes an essential part of "_.license) - on-authorization (format "No use of "_.work + on_importance (format "This disclaimer of warranty constitutes an essential part of "_.license) + on_authorization (format "No use of "_.work " is authorized under " _.license " except under this disclaimer")] - ($.paragraph (list on-basics - on-distribution - on-risk - on-fixes - on-importance - on-authorization)))) + ($.paragraph (list on_basics + on_distribution + on_risk + on_fixes + on_importance + on_authorization)))) -(def: damage-types +(def: damage_types (List Text) (list "direct" "indirect" @@ -67,7 +67,7 @@ "incidental" "consequential")) -(def: damage-consequences +(def: damage_consequences (List Text) (list "lost profits" "loss of goodwill" @@ -76,30 +76,30 @@ "any and all other commercial damages or losses")) (def: #export limitation - (let [on-limit (let [exclusion "Under no circumstances and under no legal theory" + (let [on_limit (let [exclusion "Under no circumstances and under no legal theory" examples "whether tort (including negligence), contract, or otherwise" - applicable-law-exception "unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing" + applicable_law_exception "unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing" renunciation (format "shall any " _.contributor " be liable to " _.recipient) - damage-enumeration (format "for any " ($.or damage-types) " damages of any character" - " including without limitation damages for " ($.or damage-consequences)) + damage_enumeration (format "for any " ($.or damage_types) " damages of any character" + " including without limitation damages for " ($.or damage_consequences)) conscience "even if such party shall have been informed of the possibility of such damages"] - (format exclusion ", " examples ", " applicable-law-exception ", " renunciation " " damage-enumeration ", " conscience)) - on-death-exception "This limitation of liability shall not apply to liability for death or personal injury resulting from such party’s negligence to the extent applicable law prohibits such limitation" - on-jurisdictions (format "Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to " _.recipient)] - ($.paragraph (list on-limit - on-death-exception - on-jurisdictions)))) + (format exclusion ", " examples ", " applicable_law_exception ", " renunciation " " damage_enumeration ", " conscience)) + on_death_exception "This limitation of liability shall not apply to liability for death or personal injury resulting from such party’s negligence to the extent applicable law prohibits such limitation" + on_jurisdictions (format "Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to " _.recipient)] + ($.paragraph (list on_limit + on_death_exception + on_jurisdictions)))) (def: #export litigation - (let [on-jurisdiction (format "Any litigation relating to " _.license " may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business") - on-laws "Such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions" - on-claims "Nothing in this section shall prevent a party’s ability to bring cross-claims or counter-claims"] - ($.paragraph (list on-jurisdiction - on-laws - on-claims)))) + (let [on_jurisdiction (format "Any litigation relating to " _.license " may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business") + on_laws "Such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions" + on_claims "Nothing in this section shall prevent a party’s ability to bring cross-claims or counter-claims"] + ($.paragraph (list on_jurisdiction + on_laws + on_claims)))) -(def: liability-obligations +(def: liability_obligations (List Text) (list "support" "warranty" @@ -107,34 +107,34 @@ "other liability obligations" (format "rights consistent with " _.license))) -(def: #export can-accept - (let [on-acceptance-of-liability (let [condition (format "While redistributing " _.work " or " ($.plural _.extension) " thereof") - right (format _.recipient " may choose to offer, and charge a fee for, acceptance of " ($.and/or ..liability-obligations))] +(def: #export can_accept + (let [on_acceptance_of_liability (let [condition (format "While redistributing " _.work " or " ($.plural _.extension) " thereof") + right (format _.recipient " may choose to offer, and charge a fee for, acceptance of " ($.and/or ..liability_obligations))] (format condition ", " right)) - on-responsibility (let [but "However, in accepting such obligations" - cannot-represent-a-contributor (format _.recipient " may not act on behalf of any other " _.contributor) - can-only-represent-oneself (format "only on behalf and on sole responsibility of " _.recipient) - each-contributor (: (-> Text Text) + on_responsibility (let [but "However, in accepting such obligations" + cannot_represent_a_contributor (format _.recipient " may not act on behalf of any other " _.contributor) + can_only_represent_oneself (format "only on behalf and on sole responsibility of " _.recipient) + each_contributor (: (-> Text Text) (function (_ responsibility) (format responsibility " each " _.contributor))) responsibilities (: (List Text) - (list (each-contributor "indemnify") - (each-contributor "defend") - (format (each-contributor "hold") " harmless"))) - full-responsibility-condition (format "and only if " _.recipient + (list (each_contributor "indemnify") + (each_contributor "defend") + (format (each_contributor "hold") " harmless"))) + full_responsibility_condition (format "and only if " _.recipient " agrees to " ($.and responsibilities) " for any liability incurred by, or claims asserted against, such " _.contributor " by reason of acceptance of any such warranty or additional liability by " _.recipient)] - (format but ", " cannot-represent-a-contributor ", " can-only-represent-oneself ", " full-responsibility-condition))] - ($.paragraph (list on-acceptance-of-liability - on-responsibility)))) + (format but ", " cannot_represent_a_contributor ", " can_only_represent_oneself ", " full_responsibility_condition))] + ($.paragraph (list on_acceptance_of_liability + on_responsibility)))) -(def: #export disclaim-high-risk - (let [on-work (let [intentions (: (List Text) +(def: #export disclaim_high_risk + (let [on_work (let [intentions (: (List Text) (list "designed" "manufactured" "intended for use or distribution")) - hazardous-environments (: (List Text) + hazardous_environments (: (List Text) (list "nuclear facilities" "aircraft navigation" "communications systems" @@ -149,12 +149,12 @@ disclaim (format _.work " is not fault tolerant" ", and is not " ($.or intentions) " as on-line control equipment in hazardous environments requiring fail-safe performance") - examples (format "such as in the operation of " ($.or hazardous-environments)) + examples (format "such as in the operation of " ($.or hazardous_environments)) further (format "in which the failure of " _.work " could lead directly to " ($.or consequences))] (format disclaim ", " examples ", " further)) - on-contributors (let [claim "any express or implied warranty of fitness for high risk activities"] + on_contributors (let [claim "any express or implied warranty of fitness for high risk activities"] (format _.licensor " and every " _.contributor " specifically disclaim " claim))] - ($.paragraph (list on-work - on-contributors)))) + ($.paragraph (list on_work + on_contributors)))) diff --git a/stdlib/source/program/licentia/license/limitation.lux b/licentia/source/program/licentia/license/limitation.lux index 1617d9909..046e60a55 100644 --- a/stdlib/source/program/licentia/license/limitation.lux +++ b/licentia/source/program/licentia/license/limitation.lux @@ -26,25 +26,25 @@ " permission to " ($.or abilities)) warning (format "These actions are prohibited by law if " _.recipient " does not accept " _.license) - implicit-acceptance (let [activation-condition "by performing any of these actions" + implicit_acceptance (let [activation_condition "by performing any of these actions" acceptance (format _.recipient " indicates that " _.recipient " accepts " _.license) agreement (format _.recipient " agrees to be bound by all its terms and conditions")] - (format "Therefore, " activation-condition ", " ($.and (list acceptance agreement)))) - prohibition-due-to-non-agreement (format "If " _.recipient + (format "Therefore, " activation_condition ", " ($.and (list acceptance agreement)))) + prohibition_due_to_non_agreement (format "If " _.recipient " does not agree with all the terms and conditions of " _.license ", " _.recipient " can not " ($.or abilities)) - prohibition-due-to-impossibility (format "If it is impossible for " _.recipient + prohibition_due_to_impossibility (format "If it is impossible for " _.recipient " to comply with all the terms and conditions of " _.license ", then " _.recipient " can not " ($.or abilities))] ($.paragraph (list acknowledgement limitation warning - implicit-acceptance - prohibition-due-to-non-agreement - prohibition-due-to-impossibility)))) + implicit_acceptance + prohibition_due_to_non_agreement + prohibition_due_to_impossibility)))) (def: #export grant ($.paragraph (list (format "The licenses granted in this document are the only rights granted under " _.license) @@ -68,8 +68,8 @@ "; except as required for reasonable and customary use in describing the origin of " _.work)))) -(def: #export secondary-licenses +(def: #export secondary_licenses ($.paragraph (list (format "No " _.contributor " makes additional grants as a result of a choice by " _.recipient " to distribute " _.work - " under a under the terms of a " _.secondary-license)))) + " under a under the terms of a " _.secondary_license)))) diff --git a/stdlib/source/program/licentia/license/miscellaneous.lux b/licentia/source/program/licentia/license/miscellaneous.lux index 03adb1462..0fbc96982 100644 --- a/stdlib/source/program/licentia/license/miscellaneous.lux +++ b/licentia/source/program/licentia/license/miscellaneous.lux @@ -8,29 +8,29 @@ [// ["$" document]]]) -(def: #export entire-agreement +(def: #export entire_agreement ($.paragraph (list (format _.license " constitutes the entire agreement between the parties with respect to the subject matter hereof")))) -(def: #export relationship-of-parties - (let [legal-associations (: (List Text) +(def: #export relationship_of_parties + (let [legal_associations (: (List Text) (list "an agency" "a partnership" "a joint venture" "any other form of legal association")) - forms-of-representation (: (List Text) + forms_of_representation (: (List Text) (list "expressly" "by implication" "by appearance" "otherwise")) - disclaimer (format _.license " will not be construed as creating " ($.or legal-associations)) + disclaimer (format _.license " will not be construed as creating " ($.or legal_associations)) scope (format "between or among " _.recipient ", " _.licensor " or any " _.contributor) constraint (format _.recipient - " will not represent to the contrary, whether " ($.or forms-of-representation))] + " will not represent to the contrary, whether " ($.or forms_of_representation))] ($.paragraph (list (format disclaimer " " scope ", and " constraint))))) -(def: #export independent-development +(def: #export independent_development (let [actions (: (List Text) (list "acquire" "license" @@ -53,7 +53,7 @@ " that " _.recipient " may " ($.or actions)))))) -(def: #export not-waiver +(def: #export not_waiver (let [culprits (format _.licensor " or any " _.contributor) duty (format "enforce any provision of " _.license) effect "a waiver of future enforcement of that or any other provision"] @@ -62,45 +62,45 @@ " will not be deemed " effect))))) (def: #export severability - (let [on-reformation (format "If any provision of " _.license " is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable") - on-contributor-protection (format "Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe " _.license + (let [on_reformation (format "If any provision of " _.license " is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable") + on_contributor_protection (format "Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe " _.license " against a " _.contributor)] - ($.paragraph (list on-reformation - on-contributor-protection)))) + ($.paragraph (list on_reformation + on_contributor_protection)))) -(def: #export export-restrictions +(def: #export export_restrictions (let [limiter "applicable laws and regulations" limited (: (List Text) (list "downloading" "acquiring" "exporting" "reexporting")) - on-circumstances (let [limitation (format _.recipient + on_circumstances (let [limitation (format _.recipient " may be restricted with respect to " ($.or limited)) target (format _.work " or any underlying information or technology")] (format limitation " " target " by " limiter)) - on-acceptance-of-responsibility (let [trigger (format "By " ($.or limited) " " _.work) + on_acceptance_of_responsibility (let [trigger (format "By " ($.or limited) " " _.work) agreement (format _.recipient " is agreeing to be responsible for compliance with all " limiter)] (format trigger ", " agreement))] - ($.paragraph (list on-circumstances - on-acceptance-of-responsibility)))) + ($.paragraph (list on_circumstances + on_acceptance_of_responsibility)))) -(def: #export new-versions - (let [on-publishing (let [when ", from time to time," +(def: #export new_versions + (let [on_publishing (let [when ", from time to time," what (format "revised versions of " _.license)] (format _.licensor " may publish" when " " what)) - on-published-version-validity (let [condition (format _.work " has been published under a particular version of " _.license) + on_published_version_validity (let [condition (format _.work " has been published under a particular version of " _.license) effect (format _.recipient " may always continue to use it under the terms of that version")] (format "Once " condition ", " effect)) - on-license-upgrading (format _.recipient + on_license_upgrading (format _.recipient " may also choose to use " _.work " under the terms of any subsequent version of " _.license " published by " _.licensor) - on-licensor-privilege (format "No one other than " _.licensor + on_licensor_privilege (format "No one other than " _.licensor " has the right to modify the terms applicable to " _.work " created under " _.license)] - ($.paragraph (list on-publishing - on-published-version-validity - on-license-upgrading - on-licensor-privilege)))) + ($.paragraph (list on_publishing + on_published_version_validity + on_license_upgrading + on_licensor_privilege)))) diff --git a/stdlib/source/program/licentia/license/notice.lux b/licentia/source/program/licentia/license/notice.lux index 219af97f4..7ee61397a 100644 --- a/stdlib/source/program/licentia/license/notice.lux +++ b/licentia/source/program/licentia/license/notice.lux @@ -1,12 +1,13 @@ (.module: [lux #* [data - [number - ["n" nat]] ["." text ["%" format (#+ format)]] [collection - ["." list ("#\." functor)]]]] + ["." list ("#\." functor)]]] + [math + [number + ["n" nat]]]] ["." // #_ ["#." time] ["#." copyright] @@ -14,19 +15,19 @@ [// ["$" document]]]) -(def: #export end-of-license +(def: #export end_of_license ($.sentence "END OF TERMS AND CONDITIONS")) -(def: #export (copyright-holder holder) +(def: #export (copyright_holder holder) (-> //copyright.Holder Text) (let [(^slots [#//time.start #//time.end]) (get@ #//copyright.period holder) - single-year? (n.= start end) - period-section (if single-year? + single_year? (n.= start end) + period_section (if single_year? (%.nat start) (format (%.nat start) "-" (%.nat end)))] - (format "Copyright (C) " period-section " " (get@ #//copyright.name holder)))) + (format "Copyright (C) " period_section " " (get@ #//copyright.name holder)))) (def: #export copyright (-> (List //copyright.Holder) Text) - (|>> (list\map ..copyright-holder) - (text.join-with text.new-line))) + (|>> (list\map ..copyright_holder) + (text.join_with text.new_line))) diff --git a/stdlib/source/program/licentia/license/submission.lux b/licentia/source/program/licentia/license/submission.lux index 855141690..855141690 100644 --- a/stdlib/source/program/licentia/license/submission.lux +++ b/licentia/source/program/licentia/license/submission.lux diff --git a/stdlib/source/program/licentia/license/term.lux b/licentia/source/program/licentia/license/term.lux index 54b3b1cc4..c9db7fa5a 100644 --- a/stdlib/source/program/licentia/license/term.lux +++ b/licentia/source/program/licentia/license/term.lux @@ -8,27 +8,27 @@ Text (get@ #//definition.term <definition>))] - [source-code-form //definition.source-code-form] - [object-form //definition.object-form] + [source_code_form //definition.source_code_form] + [object_form //definition.object_form] [license //definition.license] [licensable //definition.licensable] - [legal-entity //definition.legal-entity] + [legal_entity //definition.legal_entity] [recipient //definition.recipient] [licensor //definition.licensor] [work //definition.work] - [derivative-work //definition.derivative-work] + [derivative_work //definition.derivative_work] [submission //definition.submission] [modification //definition.modification] - [required-component //definition.required-component] + [required_component //definition.required_component] [extension //definition.extension] [contribution //definition.contribution] [contributor //definition.contributor] - [patent-claim //definition.patent-claim] - [secondary-license //definition.secondary-license] + [patent_claim //definition.patent_claim] + [secondary_license //definition.secondary_license] [sell //definition.sell] - [personal-use //definition.personal-use] + [personal_use //definition.personal_use] [serve //definition.serve] [research //definition.research] [deploy //definition.deploy] - [electronic-distribution-mechanism //definition.electronic-distribution-mechanism] + [electronic_distribution_mechanism //definition.electronic_distribution_mechanism] ) diff --git a/stdlib/source/program/licentia/license/time.lux b/licentia/source/program/licentia/license/time.lux index 22f28f607..22f28f607 100644 --- a/stdlib/source/program/licentia/license/time.lux +++ b/licentia/source/program/licentia/license/time.lux diff --git a/stdlib/source/program/licentia/output.lux b/licentia/source/program/licentia/output.lux index fdbd9accd..691612b6e 100644 --- a/stdlib/source/program/licentia/output.lux +++ b/licentia/source/program/licentia/output.lux @@ -13,7 +13,7 @@ Distribution Commercial Extension - Entity Black-List + Entity Black_List URL Attribution License) ["." copyright] @@ -27,7 +27,7 @@ ["." extension] ["." submission] ["." miscellaneous] - ["." black-list] + ["." black_list] ["." notice] ["_" term] ["." addendum]] @@ -39,7 +39,7 @@ (def: #export (identification value) (-> Identification Text) - (format (get@ #license.name value) text.new-line + (format (get@ #license.name value) text.new_line (get@ #license.version value))) (def: #export (grant termination) @@ -52,17 +52,17 @@ grant.copyright] ["Grant of Patent License" - (grant.patent (get@ #license.patent-retaliation? termination))] + (grant.patent (get@ #license.patent_retaliation? termination))] ["Effective Date for the Grants" grant.date] ["Grant Termination" - (grant.termination (get@ #license.termination-period termination) - (get@ #license.grace-period termination))] + (grant.termination (get@ #license.termination_period termination) + (get@ #license.grace_period termination))] ["No Retroactive Effect of Termination" - grant.no-retroactive-termination]))))) + grant.no_retroactive_termination]))))) (def: #export limitation Text @@ -76,8 +76,8 @@ ["Limitations on Trademarks" limitation.trademark] - [(format "Limitations on " ($.plural _.secondary-license)) - limitation.secondary-licenses]))))) + [(format "Limitations on " ($.plural _.secondary_license)) + limitation.secondary_licenses]))))) (def: #export assurance Text @@ -89,7 +89,7 @@ assurance.representation] ["Fair Use" - assurance.fair-use]))))) + assurance.fair_use]))))) (def: #export (liability value) (-> Liability Text) @@ -112,12 +112,12 @@ liability.litigation] ["Accepting Warranty or Additional Liability" - (get@ #license.can-accept? value) - liability.can-accept] + (get@ #license.can_accept? value) + liability.can_accept] ["High Risk Activities" - (get@ #license.disclaim-high-risk? value) - liability.disclaim-high-risk]))))) + (get@ #license.disclaim_high_risk? value) + liability.disclaim_high_risk]))))) (def: #export (distribution distribution) (-> Distribution Text) @@ -127,17 +127,17 @@ #$.content <content>})) "")] - [(format "Distribution of a " _.source-code-form) + [(format "Distribution of a " _.source_code_form) on - distribution.source-code-form] + distribution.source_code_form] - [(format "Distribution of an " _.object-form) + [(format "Distribution of an " _.object_form) on - distribution.object-form] + distribution.object_form] [(format "Distribution of an " _.extension) - (or (get@ #license.can-re-license? distribution) - (get@ #license.can-multi-license? distribution)) + (or (get@ #license.can_re_license? distribution) + (get@ #license.can_multi_license? distribution)) (distribution.extension distribution)]))))) (def: #export (commercial value) @@ -149,23 +149,23 @@ "")] ["Non-Commerciality" - (not (get@ #license.can-sell? value)) - commercial.cannot-sell] + (not (get@ #license.can_sell? value)) + commercial.cannot_sell] [(format _.contributor " Attribution") - (get@ #license.require-contributor-credit? value) - commercial.require-contributor-attribution] + (get@ #license.require_contributor_credit? value) + commercial.require_contributor_attribution] [(format _.contributor " Endorsement") - (not (get@ #license.allow-contributor-endorsement? value)) - commercial.disallow-contributor-endorsement] + (not (get@ #license.allow_contributor_endorsement? value)) + commercial.disallow_contributor_endorsement] ))))) (def: #export (extension value) (-> Extension Text) - (let [[show? document] (case (get@ #license.notification-period value) + (let [[show? document] (case (get@ #license.notification_period value) (#.Some period) - [true (extension.notification-requirement period)] + [true (extension.notification_requirement period)] #.None [false ""])] @@ -175,36 +175,36 @@ #$.content <content>})) "")] - [(get@ #license.same-license? value) "License Retention" - ($.paragraph (list\compose extension.sharing-requirement - extension.license-conflict-resolution))] + [(get@ #license.same_license? value) "License Retention" + ($.paragraph (list\compose extension.sharing_requirement + extension.license_conflict_resolution))] - [(get@ #license.must-be-distinguishable? value) (format _.extension " Distinctness") - extension.distinctness-requirement] + [(get@ #license.must_be_distinguishable? value) (format _.extension " Distinctness") + extension.distinctness_requirement] - [show? (format _.source-code-form " Availability") + [show? (format _.source_code_form " Availability") document] - [(get@ #license.must-describe-modifications? value) (format "Description of " ($.plural _.modification)) - extension.description-requirement])))))) + [(get@ #license.must_describe_modifications? value) (format "Description of " ($.plural _.modification)) + extension.description_requirement])))))) (def: #export (attribution value) (-> Attribution Text) - (let [copyright-notice (format "Attribution Copyright Notice: " (get@ #license.copyright-notice value)) + (let [copyright_notice (format "Attribution Copyright Notice: " (get@ #license.copyright_notice value)) phrase (case (get@ #license.phrase value) (#.Some phrase) - (format text.new-line "Attribution Phrase: " phrase text.new-line) + (format text.new_line "Attribution Phrase: " phrase text.new_line) #.None "") - url (format text.new-line "Attribution URL: " (get@ #license.url value)) + url (format text.new_line "Attribution URL: " (get@ #license.url value)) image (case (get@ #license.image value) (#.Some image) - (format text.new-line "Attribution Image: " image) + (format text.new_line "Attribution Image: " image) #.None "")] - (format copyright-notice + (format copyright_notice phrase url image))) @@ -219,19 +219,19 @@ ["Entire Agreement" on - miscellaneous.entire-agreement] + miscellaneous.entire_agreement] ["Relationship of Parties" on - miscellaneous.relationship-of-parties] + miscellaneous.relationship_of_parties] ["Independent Development" on - miscellaneous.independent-development] + miscellaneous.independent_development] ["Consent To Breach Not Waiver" on - miscellaneous.not-waiver] + miscellaneous.not_waiver] ["Severability" on @@ -239,14 +239,14 @@ ["Export Restrictions" on - miscellaneous.export-restrictions] + miscellaneous.export_restrictions] [(format "Versions of " _.license) identified? - miscellaneous.new-versions] + miscellaneous.new_versions] ))))) -(def: black-list-spacing (format text.new-line text.new-line)) +(def: black_list_spacing (format text.new_line text.new_line)) (def: #export (license value) (-> License Text) @@ -261,22 +261,22 @@ #.None false)] (`` (format ($.block identification) - ($.block (notice.copyright (get@ #license.copyright-holders value))) + ($.block (notice.copyright (get@ #license.copyright_holders value))) - (case (get@ #license.black-lists value) + (case (get@ #license.black_lists value) #.Nil "" - black-lists + black_lists ($.block ($.section {#$.title (format "Denial of " _.license) - #$.content (|> black-lists - (list\map black-list.black-list) - (text.join-with ..black-list-spacing))}))) + #$.content (|> black_lists + (list\map black_list.black_list) + (text.join_with ..black_list_spacing))}))) ($.section {#$.title "Definitions" #$.content (|> definition.all (list\map (|>> ..definition $.block)) - (text.join-with ""))}) + (text.join_with ""))}) ($.block ($.section {#$.title (format "Acceptance of " _.license) #$.content limitation.acceptance})) @@ -305,5 +305,5 @@ (addendum.output (get@ #license.addendum value)) - notice.end-of-license + notice.end_of_license )))) |