diff options
author | Eduardo Julian | 2022-06-16 00:48:19 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-06-16 00:48:19 -0400 |
commit | 9e2f1e76f2c8df01ed7687d934c3210fcf676bd6 (patch) | |
tree | 115fab5bd8a5f53dc0d13ce5453095324a83496f /licentia | |
parent | f92c806ee8da63f04bbefbf558f6249bacdb47ea (diff) |
De-sigil-ification: suffix : [Part 13]
Diffstat (limited to '')
19 files changed, 128 insertions, 128 deletions
diff --git a/licentia/source/program/licentia.lux b/licentia/source/program/licentia.lux index 213024c2d..11819681d 100644 --- a/licentia/source/program/licentia.lux +++ b/licentia/source/program/licentia.lux @@ -49,10 +49,10 @@ "[1]::[0]" (trim [] java/lang/String)) -(def: default_output_file +(def default_output_file "LICENSE.txt") -(def: (success_message output) +(def (success_message output) (-> file.Path Text) (format "Your license has been made!" text.new_line "Check the file " output ".")) diff --git a/licentia/source/program/licentia/document.lux b/licentia/source/program/licentia/document.lux index 42c692fb7..eb35929f4 100644 --- a/licentia/source/program/licentia/document.lux +++ b/licentia/source/program/licentia/document.lux @@ -7,29 +7,29 @@ [collection ["[0]" list (.open: "[1]#[0]" functor)]]]]]) -(def: .public (quote text) +(def .public (quote text) (-> Text Text) (format text.double_quote text text.double_quote)) -(def: .public (block content) +(def .public (block content) (-> Text Text) (format content text.new_line text.new_line)) -(def: .public (plural singular) +(def .public (plural singular) (-> Text Text) (format singular "(s)")) -(def: .public (sentence content) +(def .public (sentence content) (-> Text Text) (format content ".")) -(def: .public paragraph +(def .public paragraph (-> (List Text) Text) (|>> (list#each ..sentence) (text.interposed text.new_line))) (with_template [<name> <word>] - [(def: .public <name> + [(def .public <name> (-> (List Text) Text) ... https://en.wikipedia.org/wiki/Serial_comma (text.interposed (format ", " <word> " ")))] @@ -44,7 +44,7 @@ [#title Text #content Text])) -(def: .public (section value) +(def .public (section value) (-> Section Text) (format (..block (the #title value)) (the #content value))) diff --git a/licentia/source/program/licentia/input.lux b/licentia/source/program/licentia/input.lux index ca72241e7..b11f1a576 100644 --- a/licentia/source/program/licentia/input.lux +++ b/licentia/source/program/licentia/input.lux @@ -29,7 +29,7 @@ ["[0]" time (.only Period)] ["[0]" copyright]]]) -(def: identification +(def identification (Parser Identification) (<json>.object (all <>.and @@ -44,7 +44,7 @@ (exception.report "Amount" (%.int amount))) -(def: amount +(def amount (Parser Nat) (do <>.monad [amountF <json>.number @@ -61,7 +61,7 @@ "Start" (%.nat (the time.#start period)) "End" (%.nat (the time.#end period)))) -(def: period +(def period (Parser (Period Nat)) (<json>.object (do <>.monad @@ -73,14 +73,14 @@ (n.<= end start))] (wrap period)))) -(def: copyright_holder +(def copyright_holder (Parser copyright.Holder) (<json>.object (all <>.and (<json>.field "name" <json>.string) (<json>.field "period" ..period)))) -(def: termination +(def termination (Parser Termination) (<json>.object (all <>.and @@ -88,21 +88,21 @@ (<json>.field "termination period" ..amount) (<json>.field "grace period" ..amount)))) -(def: liability +(def liability (Parser Liability) (<json>.object (all <>.and (<json>.field "can accept?" <json>.boolean) (<json>.field "disclaim high risk?" <json>.boolean)))) -(def: distribution +(def distribution (Parser Distribution) (<json>.object (all <>.and (<json>.field "can re-license?" <json>.boolean) (<json>.field "can multi-license?" <json>.boolean)))) -(def: commercial +(def commercial (Parser Commercial) (<json>.object (all <>.and @@ -110,7 +110,7 @@ (<json>.field "require contributor credit?" <json>.boolean) (<json>.field "allow contributor endorsement?" <json>.boolean)))) -(def: extension +(def extension (Parser Extension) (<json>.object (all <>.and @@ -119,22 +119,22 @@ (<json>.field "notification period" (<json>.nullable ..period)) (<json>.field "must describe modifications?" <json>.boolean)))) -(def: entity +(def entity (Parser Entity) <json>.string) -(def: black_list +(def black_list (Parser Black_List) (<json>.object (all <>.and (<json>.field "justification" (<json>.nullable <json>.string)) (<json>.field "entities" (<json>.array (<>.many ..entity)))))) -(def: url +(def url (Parser URL) <json>.string) -(def: attribution +(def attribution (Parser Attribution) (<json>.object (all <>.and @@ -143,14 +143,14 @@ (<json>.field "url" ..url) (<json>.field "image" (<json>.nullable ..url))))) -(def: addendum +(def addendum (Parser Addendum) (<json>.object (all <>.and (<json>.field "commons clause?" <json>.boolean) ))) -(def: .public license +(def .public license (Parser License) (<json>.object (all <>.and diff --git a/licentia/source/program/licentia/license/addendum.lux b/licentia/source/program/licentia/license/addendum.lux index b443da0f4..ff3154c43 100644 --- a/licentia/source/program/licentia/license/addendum.lux +++ b/licentia/source/program/licentia/license/addendum.lux @@ -9,13 +9,13 @@ ["$" document]]]) ... https://commonsclause.com/ -(def: .public commons_clause +(def .public 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.") ($.block "For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you under the License to provide to third parties, for a fee or other consideration (including without limitation fees for hosting or consulting/ support services related to the Software), a product or service whose value derives, entirely or substantially, from the functionality of the Software. Any license notice or attribution required by the License must also include this Commons Clause License Condition notice."))) -(def: .public (output value) +(def .public (output value) (-> Addendum Text) (`` (format (~~ (with_template [<title> <condition> <content>] [(if <condition> diff --git a/licentia/source/program/licentia/license/assurance.lux b/licentia/source/program/licentia/license/assurance.lux index ddd0b1b61..71d28d670 100644 --- a/licentia/source/program/licentia/license/assurance.lux +++ b/licentia/source/program/licentia/license/assurance.lux @@ -9,14 +9,14 @@ [// ["$" document]]]) -(def: .public representation +(def .public representation ($.sentence (format "Each " _.contributor " represents that the " _.contributor " believes its " ($.plural _.contribution) " are its original creation(s) or it has sufficient rights to grant the rights to its " ($.plural _.contribution) " conveyed by " _.license))) -(def: .public fair_use +(def .public fair_use (let [copyright_doctrines (is (List Text) (list "fair use" "fair dealing" diff --git a/licentia/source/program/licentia/license/black_list.lux b/licentia/source/program/licentia/license/black_list.lux index a83ef0c23..2c579ce2f 100644 --- a/licentia/source/program/licentia/license/black_list.lux +++ b/licentia/source/program/licentia/license/black_list.lux @@ -13,11 +13,11 @@ [// ["$" document]]]) -(def: .public entity +(def .public entity (-> Entity Text) %.text) -(def: .public (black_list black_list) +(def .public (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" diff --git a/licentia/source/program/licentia/license/commercial.lux b/licentia/source/program/licentia/license/commercial.lux index 8aa43c531..aeab29d02 100644 --- a/licentia/source/program/licentia/license/commercial.lux +++ b/licentia/source/program/licentia/license/commercial.lux @@ -9,7 +9,7 @@ [// ["$" document]]]) -(def: .public cannot_sell +(def .public cannot_sell (let [preamble (format "Without limiting other conditions in " _.license) direct_condition (format "the grant of rights under " _.license " will not include, and does not grant to " _.recipient @@ -19,11 +19,11 @@ ", " direct_condition ", " derivative_condition)))) -(def: .public require_contributor_attribution +(def .public require_contributor_attribution ($.sentence (format "All advertising materials mentioning features or use of " _.licensed_work " must include an acknowledgement of the authorship of every " _.contributor))) -(def: .public disallow_contributor_endorsement +(def .public disallow_contributor_endorsement (let [subject (format "The name of no " _.contributor) capability "endorse or promote products" source (format "any " _.extension) diff --git a/licentia/source/program/licentia/license/definition.lux b/licentia/source/program/licentia/license/definition.lux index f094e291e..13da5bf69 100644 --- a/licentia/source/program/licentia/license/definition.lux +++ b/licentia/source/program/licentia/license/definition.lux @@ -12,10 +12,10 @@ [#term Text #meaning Text])) -(def: not_a_contribution_notice +(def not_a_contribution_notice (format text.double_quote "Not a Contribution" text.double_quote)) -(def: .public patent_rights +(def .public patent_rights (List Text) (list "make" "have made" @@ -25,7 +25,7 @@ "import" "transfer")) -(def: commercial_services +(def commercial_services (List Text) (let [services (is (-> Text Text) (function (_ type) @@ -34,7 +34,7 @@ (services "consulting") (services "support")))) -(def: individual_capacities +(def individual_capacities (List Text) (list "officer" "employee" @@ -42,11 +42,11 @@ "independent contractor" "agent of a corporation, business or organization (commercial or non-commercial)")) -(def: covered_work_description +(def covered_work_description "work of authorship") (with_template [<name> <term> <meaning>] - [(def: .public <name> + [(def .public <name> Definition [#term <term> #meaning <meaning>])] @@ -215,7 +215,7 @@ ($.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"))] ) -(def: .public all +(def .public all (List Definition) (list license licensable diff --git a/licentia/source/program/licentia/license/distribution.lux b/licentia/source/program/licentia/license/distribution.lux index 0281d2ae6..1a388b664 100644 --- a/licentia/source/program/licentia/license/distribution.lux +++ b/licentia/source/program/licentia/license/distribution.lux @@ -11,7 +11,7 @@ [// ["$" document]]]) -(def: notices +(def notices (List Text) (let [notices (is (-> Text Text) (function (_ what) @@ -24,7 +24,7 @@ (notices "limitation of liability") (notices "other")))) -(def: .public source_code_form +(def .public source_code_form (let [on_license_propagation (let [coverage (format "All distribution of " _.licensed_work " in " _.source_code_form) with_contributions (format "including any " ($.plural _.contribution) " that " _.recipient @@ -62,7 +62,7 @@ on_notice_retention on_additional_notices)))) -(def: .public object_form +(def .public object_form (let [on_responsibility (let [condition (format "If " _.recipient " distributes " _.licensed_work " in " _.object_form) @@ -79,7 +79,7 @@ ($.paragraph (list on_responsibility on_licensing)))) -(def: .public allow_re_licensing +(def .public allow_re_licensing (let [can_license (format _.recipient " may create and distribute an " _.extension " under terms " _.recipient @@ -89,7 +89,7 @@ " for the " _.licensed_work)] (format can_license ", " "provided that " requirement))) -(def: .public allow_multi_licensing +(def .public allow_multi_licensing (let [condition (format "the " _.extension " is a combination of " _.licensed_work " with a work governed by one or more " ($.plural _.secondary_license)) permission (let [relicensing (format _.license " permits " _.recipient @@ -102,7 +102,7 @@ (format relicensing ", " distribution))] (format "If " condition ", " permission))) -(def: .public (extension distribution) +(def .public (extension distribution) (-> Distribution Text) ($.paragraph (all list#composite (if (the //.#can_re_license? distribution) diff --git a/licentia/source/program/licentia/license/extension.lux b/licentia/source/program/licentia/license/extension.lux index 0c9362a2b..cb2a3bddf 100644 --- a/licentia/source/program/licentia/license/extension.lux +++ b/licentia/source/program/licentia/license/extension.lux @@ -11,7 +11,7 @@ [// ["$" document]]]) -(def: .public sharing_requirement +(def .public sharing_requirement (List Text) (let [on_extension (let [constraint (let [because "In consideration of, and as an express condition to, " source (format "the licenses granted to " _.recipient @@ -51,7 +51,7 @@ on_license_propagation on_license_protection))) -(def: .public license_conflict_resolution +(def .public license_conflict_resolution (List Text) (let [on_other_licenses (let [circumstance (format "Where any portion of an " _.extension " created by " _.recipient) @@ -71,7 +71,7 @@ on_licensor_judgement on_licensor_discretion))) -(def: .public distinctness_requirement +(def .public distinctness_requirement ($.paragraph (list (format "Any " _.extension " " _.recipient " does make and " _.deploy @@ -79,14 +79,14 @@ " that the " _.extension " is by " _.recipient)))) -(def: news_sources +(def news_sources (List Text) (list "news groups" "mailing lists" "weblogs" "other sites")) -(def: .public (notification_requirement [start end]) +(def .public (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 @@ -129,7 +129,7 @@ on_changes on_accesibility)))) -(def: .public description_requirement +(def .public description_requirement Text (let [on_duty (let [basic (format _.recipient " must cause any " _.modification diff --git a/licentia/source/program/licentia/license/grant.lux b/licentia/source/program/licentia/license/grant.lux index 40f256aef..729d9fd5c 100644 --- a/licentia/source/program/licentia/license/grant.lux +++ b/licentia/source/program/licentia/license/grant.lux @@ -13,12 +13,12 @@ [// ["$" document]]]) -(def: grant_header +(def grant_header (format "Subject to the terms and conditions of " _.license ", each " _.contributor " hereby grants to " _.recipient)) -(def: .public grant_characteristics +(def .public grant_characteristics (List Text) (list "perpetual" "world-wide" @@ -27,7 +27,7 @@ "royalty-free" "irrevocable")) -(def: .public copyright_grant_rights +(def .public copyright_grant_rights (List Text) (list "use" "reproduce" @@ -38,7 +38,7 @@ "sublicense" "distribute")) -(def: .public copyright +(def .public copyright ($.sentence (format grant_header " a " ($.and ..grant_characteristics) " copyright license to " ($.or ..copyright_grant_rights) " " _.licensed_work @@ -46,7 +46,7 @@ " in a " _.source_code_form " or an " _.object_form))) -(def: .public (patent retaliation?) +(def .public (patent retaliation?) (-> Bit Text) (let [grant (format grant_header " a " ($.and ..grant_characteristics) " patent license to " ($.or definition.patent_rights) " " @@ -68,16 +68,16 @@ (list retaliation_clause) (list)))))) -(def: .public date +(def .public date ($.sentence (format "The licenses granted in " _.license " with respect to any " _.contribution " become effective for each " _.contribution " on the date the " _.contributor " first distributes such " _.contribution))) -(def: restoration_scope "an ongoing basis") +(def restoration_scope "an ongoing basis") -(def: .public (grant_restoration_clause termination_period) +(def .public (grant_restoration_clause termination_period) (-> Days Text) (let [restoration_condition (format _.recipient " becomes compliant") restored_grants (format "the rights granted under " _.license @@ -93,7 +93,7 @@ ", unless and until " invalidation_condition ", and on " ..restoration_scope ", if " complaint_period_condition))) -(def: .public (grace_period_clause grace_period) +(def .public (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 @@ -112,7 +112,7 @@ " are reinstated on " ..restoration_scope " if " automatic_restoration_conditions))) -(def: .public (termination termination_period grace_period) +(def .public (termination termination_period grace_period) (-> Days Days Text) (let [on_violation_of_terms (let [what (format "The rights granted under " _.license) when (format _.recipient " fails to comply with any of its terms")] @@ -121,7 +121,7 @@ (..grant_restoration_clause termination_period) (..grace_period_clause grace_period))))) -(def: .public no_retroactive_termination +(def .public 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/licentia/source/program/licentia/license/liability.lux b/licentia/source/program/licentia/license/liability.lux index 10dfab0c2..3f7c62340 100644 --- a/licentia/source/program/licentia/license/liability.lux +++ b/licentia/source/program/licentia/license/liability.lux @@ -9,26 +9,26 @@ [// ["$" 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" "fit for a particular purpose" "non-infringing")) -(def: fixes +(def fixes (List Text) (list "servicing" "repair" "correction")) -(def: .public warranty +(def .public warranty (let [on_basics (let [applicability_escape "Unless required by applicable law or agreed to in writing" work_provisioning (format _.licensor " provides " _.licensed_work @@ -60,7 +60,7 @@ on_importance on_authorization)))) -(def: damage_types +(def damage_types (List Text) (list "direct" "indirect" @@ -68,7 +68,7 @@ "incidental" "consequential")) -(def: damage_consequences +(def damage_consequences (List Text) (list "lost profits" "loss of goodwill" @@ -76,7 +76,7 @@ "computer failure or malfunction" "any and all other commercial damages or losses")) -(def: .public limitation +(def .public limitation (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" @@ -92,7 +92,7 @@ on_death_exception on_jurisdictions)))) -(def: .public litigation +(def .public 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"] @@ -100,7 +100,7 @@ on_laws on_claims)))) -(def: liability_obligations +(def liability_obligations (List Text) (list "support" "warranty" @@ -108,7 +108,7 @@ "other liability obligations" (format "rights consistent with " _.license))) -(def: .public can_accept +(def .public can_accept (let [on_acceptance_of_liability (let [condition (format "While redistributing " _.licensed_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)) @@ -130,7 +130,7 @@ ($.paragraph (list on_acceptance_of_liability on_responsibility)))) -(def: .public disclaim_high_risk +(def .public disclaim_high_risk (let [on_work (let [intentions (is (List Text) (list "designed" "manufactured" diff --git a/licentia/source/program/licentia/license/limitation.lux b/licentia/source/program/licentia/license/limitation.lux index 9429874e8..741ebbb61 100644 --- a/licentia/source/program/licentia/license/limitation.lux +++ b/licentia/source/program/licentia/license/limitation.lux @@ -9,7 +9,7 @@ [// ["$" document]]]) -(def: .public acceptance +(def .public acceptance (let [abilities (is (List Text) (list "use" "copy" @@ -47,7 +47,7 @@ prohibition_due_to_non_agreement prohibition_due_to_impossibility)))) -(def: .public grant +(def .public grant ($.paragraph (list (format "The licenses granted in this document are the only rights granted under " _.license) (format "No additional rights or licenses will be implied from the distribution or licensing of " _.licensed_work " under " _.license) @@ -55,7 +55,7 @@ " for any code that the " _.contributor " has removed from " _.licensed_work)))) -(def: identifiers +(def identifiers (List Text) (list "trade names" "trademarks" @@ -63,13 +63,13 @@ "product names" "logos")) -(def: .public trademark +(def .public trademark ($.paragraph (list (format _.license " does not grant any permission to use the " ($.or ..identifiers) " of any " _.contributor "; except as required for reasonable and customary use in describing the origin of " _.licensed_work)))) -(def: .public secondary_licenses +(def .public secondary_licenses ($.paragraph (list (format "No " _.contributor " makes additional grants as a result of a choice by " _.recipient " to distribute " _.licensed_work diff --git a/licentia/source/program/licentia/license/miscellaneous.lux b/licentia/source/program/licentia/license/miscellaneous.lux index 8e5dcf0b3..18041be49 100644 --- a/licentia/source/program/licentia/license/miscellaneous.lux +++ b/licentia/source/program/licentia/license/miscellaneous.lux @@ -9,10 +9,10 @@ [// ["$" document]]]) -(def: .public entire_agreement +(def .public entire_agreement ($.paragraph (list (format _.license " constitutes the entire agreement between the parties with respect to the subject matter hereof")))) -(def: .public relationship_of_parties +(def .public relationship_of_parties (let [legal_associations (is (List Text) (list "an agency" "a partnership" @@ -31,7 +31,7 @@ " will not represent to the contrary, whether " ($.or forms_of_representation))] ($.paragraph (list (format disclaimer " " scope ", and " constraint))))) -(def: .public independent_development +(def .public independent_development (let [actions (is (List Text) (list "acquire" "license" @@ -54,7 +54,7 @@ " that " _.recipient " may " ($.or actions)))))) -(def: .public not_waiver +(def .public 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,14 +62,14 @@ " to " duty " will not be deemed " effect))))) -(def: .public severability +(def .public 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 " against a " _.contributor)] ($.paragraph (list on_reformation on_contributor_protection)))) -(def: .public export_restrictions +(def .public export_restrictions (let [limiter "applicable laws and regulations" limited (is (List Text) (list "downloading" @@ -87,7 +87,7 @@ ($.paragraph (list on_circumstances on_acceptance_of_responsibility)))) -(def: .public new_versions +(def .public new_versions (let [on_publishing (let [when ", from time to time," what (format "revised versions of " _.license)] (format _.licensor " may publish" when " " what)) diff --git a/licentia/source/program/licentia/license/notice.lux b/licentia/source/program/licentia/license/notice.lux index ed336e6f6..67b0c3f41 100644 --- a/licentia/source/program/licentia/license/notice.lux +++ b/licentia/source/program/licentia/license/notice.lux @@ -16,10 +16,10 @@ [// ["$" document]]]) -(def: .public end_of_license +(def .public end_of_license ($.sentence "END OF TERMS AND CONDITIONS")) -(def: .public (copyright_holder holder) +(def .public (copyright_holder holder) (-> //copyright.Holder Text) (let [(open "[0]") (the //copyright.#period holder) single_year? (n.= start end) @@ -28,7 +28,7 @@ (format (%.nat start) "-" (%.nat end)))] (format "Copyright (C) " period_section " " (the //copyright.#name holder)))) -(def: .public copyright +(def .public copyright (-> (List //copyright.Holder) Text) (|>> (list#each ..copyright_holder) (text.interposed text.new_line))) diff --git a/licentia/source/program/licentia/license/submission.lux b/licentia/source/program/licentia/license/submission.lux index ff4f12008..48245707e 100644 --- a/licentia/source/program/licentia/license/submission.lux +++ b/licentia/source/program/licentia/license/submission.lux @@ -9,7 +9,7 @@ [// ["$" document]]]) -(def: .public contribution +(def .public contribution (let [on-submissions (let [exception (format "Unless " _.recipient " explicitly states otherwise") general-case (format "any intentional " _.submission " of a " _.contribution " for inclusion in " _.licensed_work diff --git a/licentia/source/program/licentia/license/term.lux b/licentia/source/program/licentia/license/term.lux index 55aee7bae..c1925b02c 100644 --- a/licentia/source/program/licentia/license/term.lux +++ b/licentia/source/program/licentia/license/term.lux @@ -5,7 +5,7 @@ ["[1][0]" definition]]) (with_template [<term> <definition>] - [(def: .public <term> + [(def .public <term> Text (the //definition.#term <definition>))] diff --git a/licentia/source/program/licentia/output.lux b/licentia/source/program/licentia/output.lux index 9494d1428..d36a6d900 100644 --- a/licentia/source/program/licentia/output.lux +++ b/licentia/source/program/licentia/output.lux @@ -36,16 +36,16 @@ ["[0]" addendum]] ["$" document]]) -(def: .public (definition value) +(def .public (definition value) (-> Definition Text) (format ($.quote (the definition.#term value)) ": " (the definition.#meaning value))) -(def: .public (identification value) +(def .public (identification value) (-> Identification Text) (format (the license.#name value) text.new_line (the license.#version value))) -(def: .public (grant termination) +(def .public (grant termination) (-> Termination Text) (`` (format (~~ (with_template [<title> <content>] [($.block ($.section [#$.title <title> @@ -67,7 +67,7 @@ ["No Retroactive Effect of Termination" grant.no_retroactive_termination]))))) -(def: .public limitation +(def .public limitation Text (`` (format (~~ (with_template [<title> <content>] [($.block ($.section [#$.title <title> @@ -82,7 +82,7 @@ [(format "Limitations on " ($.plural _.secondary_license)) limitation.secondary_licenses]))))) -(def: .public assurance +(def .public assurance Text (`` (format (~~ (with_template [<title> <content>] [($.block ($.section [#$.title <title> @@ -94,7 +94,7 @@ ["Fair Use" assurance.fair_use]))))) -(def: .public (liability value) +(def .public (liability value) (-> Liability Text) (`` (format (~~ (with_template [<title> <condition> <content>] [(if <condition> @@ -122,7 +122,7 @@ (the license.#disclaim_high_risk? value) liability.disclaim_high_risk]))))) -(def: .public (distribution distribution) +(def .public (distribution distribution) (-> Distribution Text) (`` (format (~~ (with_template [<title> <condition> <content>] [(if <condition> @@ -143,7 +143,7 @@ (the license.#can_multi_license? distribution)) (distribution.extension distribution)]))))) -(def: .public (commercial value) +(def .public (commercial value) (-> Commercial Text) (`` (format (~~ (with_template [<title> <condition> <content>] [(if <condition> @@ -164,7 +164,7 @@ commercial.disallow_contributor_endorsement] ))))) -(def: .public (extension value) +(def .public (extension value) (-> Extension Text) (let [[show? document] (case (the license.#notification_period value) {.#Some period} @@ -191,7 +191,7 @@ [(the license.#must_describe_modifications? value) (format "Description of " ($.plural _.modification)) extension.description_requirement])))))) -(def: .public (attribution value) +(def .public (attribution value) (-> Attribution Text) (let [copyright_notice (format "Attribution Copyright Notice: " (the license.#copyright_notice value)) phrase (case (the license.#phrase value) @@ -212,7 +212,7 @@ url image))) -(def: .public (miscellaneous identified?) +(def .public (miscellaneous identified?) (-> Bit Text) (`` (format (~~ (with_template [<title> <condition> <content>] [(if <condition> @@ -249,9 +249,9 @@ 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: .public (license value) +(def .public (license value) (-> License Text) (let [identification (|> value (the license.#identification) diff --git a/licentia/source/test/licentia.lux b/licentia/source/test/licentia.lux index a76149e42..c063260ae 100644 --- a/licentia/source/test/licentia.lux +++ b/licentia/source/test/licentia.lux @@ -44,7 +44,7 @@ ["[0]" black_list] ["[0]" addendum]]]) -(def: period +(def period (Random (Period Nat)) (do [! random.monad] [start (random.filter (|>> (n.= n#top) not) @@ -56,45 +56,45 @@ (wrap [time.#start start time.#end end]))) -(def: copyright_holder +(def copyright_holder (Random copyright.Holder) (all random.and (random.ascii 10) ..period)) -(def: identification +(def identification (Random Identification) (all random.and (random.ascii 10) (random.ascii 10))) -(def: termination +(def termination (Random Termination) (all random.and random.bit random.nat random.nat)) -(def: liability +(def liability (Random Liability) (all random.and random.bit random.bit)) -(def: distribution +(def distribution (Random Distribution) (all random.and random.bit random.bit)) -(def: commercial +(def commercial (Random Commercial) (all random.and random.bit random.bit random.bit)) -(def: extension +(def extension (Random Extension) (all random.and random.bit @@ -102,28 +102,28 @@ (random.maybe ..period) random.bit)) -(def: entity +(def entity (Random Entity) (random.ascii 10)) -(def: (variable_list max_size gen_element) +(def (variable_list max_size gen_element) (All (_ a) (-> Nat (Random a) (Random (List a)))) (do [! random.monad] [amount (at ! each (n.% (n.max 1 max_size)) random.nat)] (random.list amount gen_element))) -(def: black_list +(def black_list (Random Black_List) (all random.and (random.maybe (random.ascii 10)) (variable_list 10 ..entity))) -(def: url +(def url (Random URL) (random.ascii 10)) -(def: attribution +(def attribution (Random Attribution) (all random.and (random.ascii 10) @@ -131,13 +131,13 @@ ..url (random.maybe ..url))) -(def: addendum +(def addendum (Random Addendum) (all random.and random.bit )) -(def: license +(def license (Random License) (all random.and (random.list 2 ..copyright_holder) @@ -155,7 +155,7 @@ (type: (Concern a) (-> (-> Text Bit) a Test)) -(def: (about_grant present? termination) +(def (about_grant present? termination) (Concern Termination) (all _.and (_.property "Copyright grant is present." @@ -175,7 +175,7 @@ (present? grant.no_retroactive_termination)) )) -(def: (about_liability present? liability) +(def (about_liability present? liability) (Concern Liability) (all _.and (_.property "Warranty liability disclaimer is present." @@ -192,7 +192,7 @@ (present? liability.disclaim_high_risk))) )) -(def: (about_distribution present? distribution) +(def (about_distribution present? distribution) (Concern Distribution) (all _.and (_.property "Conditions for source-code distribution are present." @@ -203,7 +203,7 @@ (present? (distribution.extension distribution))) )) -(def: (about_commercial present? commercial) +(def (about_commercial present? commercial) (Concern Commercial) (all _.and (_.property "Non-commercial clause is present." @@ -217,7 +217,7 @@ (present? commercial.disallow_contributor_endorsement))) )) -(def: (about_extension present? extension) +(def (about_extension present? extension) (Concern Extension) (all _.and (_.property "The license is viral." @@ -239,7 +239,7 @@ (present? extension.description_requirement))) )) -(def: (about_attribution present? attribution) +(def (about_attribution present? attribution) (Concern Attribution) (all _.and (_.property "The attribution copyright notice is present." @@ -258,7 +258,7 @@ (maybe.default true))) )) -(def: (about_miscellaneous present?) +(def (about_miscellaneous present?) (-> (-> Text Bit) Test) (all _.and (_.property "License constitutes the entire agreement." @@ -275,7 +275,7 @@ (present? miscellaneous.export_restrictions)) )) -(def: (about_addendum present? value) +(def (about_addendum present? value) (Concern Addendum) (all _.and (_.property "Commons clause" @@ -283,7 +283,7 @@ (present? addendum.commons_clause))) )) -(def: test +(def test Test (do random.monad [license ..license |