diff options
author | Eduardo Julian | 2019-06-20 22:32:59 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-06-20 22:32:59 -0400 |
commit | b71b861008381626633bf28b033cd866d7e4e0b7 (patch) | |
tree | 3ee21cd21e6dd80f6fcdf90173bbd6162b616d8f /stdlib/source/program/licentia | |
parent | fcee38da766a683ed5569978be153c6e7a8ae0af (diff) |
Improved the convention for using text formatters.
Diffstat (limited to 'stdlib/source/program/licentia')
16 files changed, 54 insertions, 57 deletions
diff --git a/stdlib/source/program/licentia/document.lux b/stdlib/source/program/licentia/document.lux index 1fd0189eb..b3787f2f2 100644 --- a/stdlib/source/program/licentia/document.lux +++ b/stdlib/source/program/licentia/document.lux @@ -2,7 +2,7 @@ [lux (#- or and) [data ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor)]]]]) diff --git a/stdlib/source/program/licentia/input.lux b/stdlib/source/program/licentia/input.lux index a10452f5b..7af7c33d4 100644 --- a/stdlib/source/program/licentia/input.lux +++ b/stdlib/source/program/licentia/input.lux @@ -6,7 +6,7 @@ ["." parser]] [data [text - format] + ["%" format (#+ format)]] [format ["." json (#+ Reader)]]]] [// @@ -30,10 +30,10 @@ (json.field "version" json.string)))) (exception: #export (cannot-use-fractional-amount {amount Frac}) - (ex.report ["Amount" (%f amount)])) + (ex.report ["Amount" (%.frac amount)])) (exception: #export (cannot-use-negative-amount {amount Int}) - (ex.report ["Amount" (%i amount)])) + (ex.report ["Amount" (%.int amount)])) (def: amount (Reader Nat) @@ -48,8 +48,8 @@ (wrap (.nat amountI)))) (exception: #export (invalid-period {period (Period Nat)}) - (ex.report ["Start" (%n (get@ #time.start period))] - ["End" (%n (get@ #time.end period))])) + (ex.report ["Start" (%.nat (get@ #time.start period))] + ["End" (%.nat (get@ #time.end period))])) (def: period (Reader (Period Nat)) diff --git a/stdlib/source/program/licentia/license/assurance.lux b/stdlib/source/program/licentia/license/assurance.lux index c75598962..155472cd1 100644 --- a/stdlib/source/program/licentia/license/assurance.lux +++ b/stdlib/source/program/licentia/license/assurance.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format]]] + ["%" format (#+ format)]]]] [// ["_" term] [// diff --git a/stdlib/source/program/licentia/license/black-list.lux b/stdlib/source/program/licentia/license/black-list.lux index ac5ab8a2c..a71ceda9c 100644 --- a/stdlib/source/program/licentia/license/black-list.lux +++ b/stdlib/source/program/licentia/license/black-list.lux @@ -3,7 +3,7 @@ [data ["." maybe ("#;." functor)] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor)]]]] ["." // (#+ Entity Black-List) @@ -13,7 +13,7 @@ (def: #export entity (-> Entity Text) - %t) + %.text) (def: #export (black-list black-list) (-> Black-List Text) diff --git a/stdlib/source/program/licentia/license/commercial.lux b/stdlib/source/program/licentia/license/commercial.lux index 787d92034..f05bcf470 100644 --- a/stdlib/source/program/licentia/license/commercial.lux +++ b/stdlib/source/program/licentia/license/commercial.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." monoid)]]]] ["." // (#+ Commercial) diff --git a/stdlib/source/program/licentia/license/definition.lux b/stdlib/source/program/licentia/license/definition.lux index fea7b91f4..6739039dc 100644 --- a/stdlib/source/program/licentia/license/definition.lux +++ b/stdlib/source/program/licentia/license/definition.lux @@ -2,7 +2,7 @@ [lux (#- Definition) [data ["." text - format]]] + ["%" format (#+ format)]]]] [/// ["$" document]]) diff --git a/stdlib/source/program/licentia/license/distribution.lux b/stdlib/source/program/licentia/license/distribution.lux index 077735b2c..58eaab22d 100644 --- a/stdlib/source/program/licentia/license/distribution.lux +++ b/stdlib/source/program/licentia/license/distribution.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." monoid)]]]] ["." // (#+ Distribution) diff --git a/stdlib/source/program/licentia/license/extension.lux b/stdlib/source/program/licentia/license/extension.lux index 83da58873..68b5f6669 100644 --- a/stdlib/source/program/licentia/license/extension.lux +++ b/stdlib/source/program/licentia/license/extension.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." monoid)]]]] ["." // (#+ Extension) @@ -93,7 +93,7 @@ " must notify the software community of the availability of the " _.source-code-form " to any " _.extension " created by " _.recipient - " within " (%n start) + " within " (%.nat start) " month(s) of the date " _.recipient " initially does " _.deploy ", and include in such notification a description of the " _.extension @@ -101,7 +101,7 @@ " via an " _.electronic-distribution-mechanism) on-duration (format "The " _.source-code-form " must remain available via an " _.electronic-distribution-mechanism - " for no less than " (%n end) + " for no less than " (%.nat end) " month(s) after the date " _.recipient " ceases to " _.deploy) on-responsibility (format _.recipient @@ -116,7 +116,7 @@ " in excess of the actual cost of duplication and distribution of said copy that " _.recipient " incurs") on-changes (format "Should such instructions change, " _.recipient - " must notify the software community of revised instructions within " (%n start) + " 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) diff --git a/stdlib/source/program/licentia/license/grant.lux b/stdlib/source/program/licentia/license/grant.lux index 1725755b7..0f45f3592 100644 --- a/stdlib/source/program/licentia/license/grant.lux +++ b/stdlib/source/program/licentia/license/grant.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format]]] + ["%" format (#+ format)]]]] [// [time (#+ Days)] ["_" term] @@ -83,7 +83,7 @@ " explicitly and finally terminates the grants to " _.recipient) complaint-period-condition (format "such " _.contributor " fails to notify " _.recipient - " of the non-compliance by some reasonable means prior to " (%n 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" @@ -100,7 +100,7 @@ " has received notice of non-compliance with " _.license " from such " _.contributor) prompt-compliance (format _.recipient - " becomes compliant prior to " (%n grace-period) + " becomes compliant prior to " (%.nat grace-period) " " ($.plural "day") " after reception of the notice")] ($.and (list notification first-offense diff --git a/stdlib/source/program/licentia/license/liability.lux b/stdlib/source/program/licentia/license/liability.lux index 598341449..51b98ad40 100644 --- a/stdlib/source/program/licentia/license/liability.lux +++ b/stdlib/source/program/licentia/license/liability.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format]]] + ["%" format (#+ format)]]]] [// ["_" term] [// diff --git a/stdlib/source/program/licentia/license/limitation.lux b/stdlib/source/program/licentia/license/limitation.lux index 602a4f163..1617d9909 100644 --- a/stdlib/source/program/licentia/license/limitation.lux +++ b/stdlib/source/program/licentia/license/limitation.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format]]] + ["%" format (#+ format)]]]] [// ["_" term] [// diff --git a/stdlib/source/program/licentia/license/miscellaneous.lux b/stdlib/source/program/licentia/license/miscellaneous.lux index a04e3e1e2..03adb1462 100644 --- a/stdlib/source/program/licentia/license/miscellaneous.lux +++ b/stdlib/source/program/licentia/license/miscellaneous.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format]]] + ["%" format (#+ format)]]]] [// ["_" term] [// diff --git a/stdlib/source/program/licentia/license/notice.lux b/stdlib/source/program/licentia/license/notice.lux index 7e775078c..947669035 100644 --- a/stdlib/source/program/licentia/license/notice.lux +++ b/stdlib/source/program/licentia/license/notice.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor)]]]] ["." // #_ @@ -20,8 +20,8 @@ (let [(^slots [#//time.start #//time.end]) (get@ #//copyright.period holder) single-year? (n/= start end) period-section (if single-year? - (%n start) - (format (%n start) "-" (%n end)))] + (%.nat start) + (format (%.nat start) "-" (%.nat end)))] (format "Copyright (C) " period-section " " (get@ #//copyright.name holder)))) (def: #export copyright diff --git a/stdlib/source/program/licentia/license/submission.lux b/stdlib/source/program/licentia/license/submission.lux index d700c1c1c..855141690 100644 --- a/stdlib/source/program/licentia/license/submission.lux +++ b/stdlib/source/program/licentia/license/submission.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format]]] + ["%" format (#+ format)]]]] [// ["_" term] [// diff --git a/stdlib/source/program/licentia/license/term.lux b/stdlib/source/program/licentia/license/term.lux index 31b3e4b5d..54b3b1cc4 100644 --- a/stdlib/source/program/licentia/license/term.lux +++ b/stdlib/source/program/licentia/license/term.lux @@ -1,37 +1,34 @@ (.module: - [lux (#- Definition) - [data - ["." text - format]]] - [// - ["." definition]]) + [lux (#- Definition)] + ["." // #_ + ["#." definition]]) (template [<term> <definition>] [(def: #export <term> Text - (get@ #definition.term <definition>))] + (get@ #//definition.term <definition>))] - [source-code-form definition.source-code-form] - [object-form definition.object-form] - [license definition.license] - [licensable definition.licensable] - [legal-entity definition.legal-entity] - [recipient definition.recipient] - [licensor definition.licensor] - [work definition.work] - [derivative-work definition.derivative-work] - [submission definition.submission] - [modification definition.modification] - [required-component definition.required-component] - [extension definition.extension] - [contribution definition.contribution] - [contributor definition.contributor] - [patent-claim definition.patent-claim] - [secondary-license definition.secondary-license] - [sell definition.sell] - [personal-use definition.personal-use] - [serve definition.serve] - [research definition.research] - [deploy definition.deploy] - [electronic-distribution-mechanism definition.electronic-distribution-mechanism] + [source-code-form //definition.source-code-form] + [object-form //definition.object-form] + [license //definition.license] + [licensable //definition.licensable] + [legal-entity //definition.legal-entity] + [recipient //definition.recipient] + [licensor //definition.licensor] + [work //definition.work] + [derivative-work //definition.derivative-work] + [submission //definition.submission] + [modification //definition.modification] + [required-component //definition.required-component] + [extension //definition.extension] + [contribution //definition.contribution] + [contributor //definition.contributor] + [patent-claim //definition.patent-claim] + [secondary-license //definition.secondary-license] + [sell //definition.sell] + [personal-use //definition.personal-use] + [serve //definition.serve] + [research //definition.research] + [deploy //definition.deploy] + [electronic-distribution-mechanism //definition.electronic-distribution-mechanism] ) diff --git a/stdlib/source/program/licentia/output.lux b/stdlib/source/program/licentia/output.lux index 43080697e..05d68ff76 100644 --- a/stdlib/source/program/licentia/output.lux +++ b/stdlib/source/program/licentia/output.lux @@ -3,7 +3,7 @@ [data ["." maybe ("#;." functor)] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor monoid)]]]] [// |