diff options
author | Eduardo Julian | 2019-02-05 20:30:13 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-02-05 20:30:13 -0400 |
commit | 60430ee6dfffbeb220a3e8fee7336d54313467bc (patch) | |
tree | e00b48c2af5354392f514347547340f67f71e708 /stdlib/source/program/licentia/license/black-list.lux | |
parent | c542e618266c2f321704bef381b14213c30cc2e0 (diff) |
Folded license-making program (legislator) into the Lux project proper (as licentia).
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/licentia/license/black-list.lux | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/stdlib/source/program/licentia/license/black-list.lux b/stdlib/source/program/licentia/license/black-list.lux new file mode 100644 index 000000000..7f30acadf --- /dev/null +++ b/stdlib/source/program/licentia/license/black-list.lux @@ -0,0 +1,31 @@ +(.module: + [lux #* + [data + ["." maybe ("maybe/." functor)] + ["." text + format] + [collection + ["." list ("list/." functor)]]]] + ["." // (#+ Entity Black-List) + ["_" term] + [// + ["$" document]]]) + +(def: #export entity + (-> Entity Text) + %t) + +(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 + (get@ #//.justification) + (maybe/map (|>> (format ", due to "))) + (maybe.default "")) + entities (|> black-list + (get@ #//.entities) + (list/map ..entity) + (text.join-with text.new-line))] + (format scope " " effect justification ":" text.new-line + entities))) |