aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program
diff options
context:
space:
mode:
authorEduardo Julian2019-03-15 00:23:49 -0400
committerEduardo Julian2019-03-15 00:23:49 -0400
commitf9d4d316ef9666f6b122b0eec8180351216e95f8 (patch)
tree2a66da0c7552dcb3642ba37afd53f1bef44eef41 /stdlib/source/program
parent9449d89f611ba3192373fdeb6848d02707ff1292 (diff)
Changed the convention for the structure opening separator from "/" to ";", to avoid confusion since "/" is used for relative module paths.
Diffstat (limited to 'stdlib/source/program')
-rw-r--r--stdlib/source/program/licentia.lux4
-rw-r--r--stdlib/source/program/licentia/document.lux4
-rw-r--r--stdlib/source/program/licentia/license/black-list.lux8
-rw-r--r--stdlib/source/program/licentia/license/commercial.lux2
-rw-r--r--stdlib/source/program/licentia/license/distribution.lux4
-rw-r--r--stdlib/source/program/licentia/license/extension.lux2
-rw-r--r--stdlib/source/program/licentia/license/notice.lux4
-rw-r--r--stdlib/source/program/licentia/output.lux14
-rw-r--r--stdlib/source/program/scriptum.lux66
9 files changed, 54 insertions, 54 deletions
diff --git a/stdlib/source/program/licentia.lux b/stdlib/source/program/licentia.lux
index 0b7bca16f..87ec7a9eb 100644
--- a/stdlib/source/program/licentia.lux
+++ b/stdlib/source/program/licentia.lux
@@ -28,7 +28,7 @@
[format
["." json]]]
["." cli (#+ program:)]
- ["." io (#+ IO) ("#/." monad)]
+ ["." io (#+ IO) ("#;." monad)]
[world
["." file (#+ Path File)]]
[host (#+ import:)]]
@@ -58,7 +58,7 @@
(do (error.with io.monad)
[file (!.use (:: file.system file) input)
blob (!.use (:: file content) [])
- document (io/wrap (do error.monad
+ document (io;wrap (do error.monad
[raw-json (encoding.from-utf8 blob)
json (|> raw-json
(:coerce java/lang/String)
diff --git a/stdlib/source/program/licentia/document.lux b/stdlib/source/program/licentia/document.lux
index 9afbb8d7b..c04cd9d72 100644
--- a/stdlib/source/program/licentia/document.lux
+++ b/stdlib/source/program/licentia/document.lux
@@ -4,7 +4,7 @@
["." text
format]
[collection
- ["." list ("#/." functor)]]]])
+ ["." list ("#;." functor)]]]])
(def: #export (quote text)
(-> Text Text)
@@ -24,7 +24,7 @@
(def: #export paragraph
(-> (List Text) Text)
- (|>> (list/map ..sentence)
+ (|>> (list;map ..sentence)
(text.join-with text.new-line)))
(do-template [<name> <word>]
diff --git a/stdlib/source/program/licentia/license/black-list.lux b/stdlib/source/program/licentia/license/black-list.lux
index 1b1ec2dff..ac5ab8a2c 100644
--- a/stdlib/source/program/licentia/license/black-list.lux
+++ b/stdlib/source/program/licentia/license/black-list.lux
@@ -1,11 +1,11 @@
(.module:
[lux #*
[data
- ["." maybe ("#/." functor)]
+ ["." maybe ("#;." functor)]
["." text
format]
[collection
- ["." list ("#/." functor)]]]]
+ ["." list ("#;." functor)]]]]
["." // (#+ Entity Black-List)
["_" term]
[//
@@ -21,11 +21,11 @@
effect "shall not be granted to the following entities, or any subsidiary thereof"
justification (|> black-list
(get@ #//.justification)
- (maybe/map (|>> (format ", due to ")))
+ (maybe;map (|>> (format ", due to ")))
(maybe.default ""))
entities (|> black-list
(get@ #//.entities)
- (list/map ..entity)
+ (list;map ..entity)
(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/stdlib/source/program/licentia/license/commercial.lux
index 37b2e2d74..787d92034 100644
--- a/stdlib/source/program/licentia/license/commercial.lux
+++ b/stdlib/source/program/licentia/license/commercial.lux
@@ -4,7 +4,7 @@
["." text
format]
[collection
- ["." list ("#/." monoid)]]]]
+ ["." list ("#;." monoid)]]]]
["." // (#+ Commercial)
["_" term]
[//
diff --git a/stdlib/source/program/licentia/license/distribution.lux b/stdlib/source/program/licentia/license/distribution.lux
index a42a83ba9..077735b2c 100644
--- a/stdlib/source/program/licentia/license/distribution.lux
+++ b/stdlib/source/program/licentia/license/distribution.lux
@@ -4,7 +4,7 @@
["." text
format]
[collection
- ["." list ("#/." monoid)]]]]
+ ["." list ("#;." monoid)]]]]
["." // (#+ Distribution)
["_" term]
[//
@@ -103,7 +103,7 @@
(def: #export (extension distribution)
(-> Distribution Text)
- ($.paragraph ($_ list/compose
+ ($.paragraph ($_ list;compose
(if (get@ #//.can-re-license? distribution)
(list allow-re-licensing)
(list))
diff --git a/stdlib/source/program/licentia/license/extension.lux b/stdlib/source/program/licentia/license/extension.lux
index 7a12f45b9..83da58873 100644
--- a/stdlib/source/program/licentia/license/extension.lux
+++ b/stdlib/source/program/licentia/license/extension.lux
@@ -4,7 +4,7 @@
["." text
format]
[collection
- ["." list ("#/." monoid)]]]]
+ ["." list ("#;." monoid)]]]]
["." // (#+ Extension)
["_" term]
["." grant]
diff --git a/stdlib/source/program/licentia/license/notice.lux b/stdlib/source/program/licentia/license/notice.lux
index b1cf5658e..7e775078c 100644
--- a/stdlib/source/program/licentia/license/notice.lux
+++ b/stdlib/source/program/licentia/license/notice.lux
@@ -4,7 +4,7 @@
["." text
format]
[collection
- ["." list ("#/." functor)]]]]
+ ["." list ("#;." functor)]]]]
["." // #_
["#." time]
["#." copyright]
@@ -26,5 +26,5 @@
(def: #export copyright
(-> (List //copyright.Holder) Text)
- (|>> (list/map ..copyright-holder)
+ (|>> (list;map ..copyright-holder)
(text.join-with text.new-line)))
diff --git a/stdlib/source/program/licentia/output.lux b/stdlib/source/program/licentia/output.lux
index 475c4b908..29d61dd42 100644
--- a/stdlib/source/program/licentia/output.lux
+++ b/stdlib/source/program/licentia/output.lux
@@ -1,11 +1,11 @@
(.module:
[lux (#- Definition)
[data
- ["." maybe ("#/." functor)]
+ ["." maybe ("#;." functor)]
["." text
format]
[collection
- ["." list ("#/." functor monoid)]]]]
+ ["." list ("#;." functor monoid)]]]]
[//
["." license (#+ Identification
Termination
@@ -175,7 +175,7 @@
"")]
[(get@ #license.same-license? value) "License Retention"
- ($.paragraph (list/compose extension.sharing-requirement
+ ($.paragraph (list;compose extension.sharing-requirement
extension.license-conflict-resolution))]
[(get@ #license.must-be-distinguishable? value) (format _.extension " Distinctness")
@@ -251,7 +251,7 @@
(-> License Text)
(let [identification (|> value
(get@ #license.identification)
- (maybe/map ..identification)
+ (maybe;map ..identification)
(maybe.default ""))
identified? (case (get@ #license.identification value)
(#.Some _)
@@ -269,12 +269,12 @@
black-lists
($.block ($.section {#$.title (format "Denial of " _.license)
#$.content (|> black-lists
- (list/map black-list.black-list)
+ (list;map black-list.black-list)
(text.join-with ..black-list-spacing))})))
($.section {#$.title "Definitions"
#$.content (|> definition.all
- (list/map (|>> ..definition $.block))
+ (list;map (|>> ..definition $.block))
(text.join-with ""))})
($.block ($.section {#$.title (format "Acceptance of " _.license)
@@ -294,7 +294,7 @@
(|> value
(get@ #license.attribution)
- (maybe/map (|>> ..attribution
+ (maybe;map (|>> ..attribution
["Attribution Information"]
$.section
$.block))
diff --git a/stdlib/source/program/scriptum.lux b/stdlib/source/program/scriptum.lux
index a51a1765b..defca9477 100644
--- a/stdlib/source/program/scriptum.lux
+++ b/stdlib/source/program/scriptum.lux
@@ -13,12 +13,12 @@
["." error (#+ Error)]
[format
["md" markdown (#+ Markdown Span Block)]]
- ["." text ("#/." equivalence)
+ ["." text ("#;." equivalence)
format
["." encoding]]
[collection
- ["." sequence (#+ Sequence) ("#/." functor)]
- ["." list ("#/." functor fold)]]]
+ ["." sequence (#+ Sequence) ("#;." functor)]
+ ["." list ("#;." functor fold)]]]
["." function]
["." type]
["." macro]
@@ -44,7 +44,7 @@
(def: type-var-names
(Sequence Text)
- (|> 0 (sequence.iterate inc) (sequence/map parameter-type-name)))
+ (|> 0 (sequence.iterate inc) (sequence;map parameter-type-name)))
(do-template [<name> <partition>]
[(def: (<name> id)
@@ -81,13 +81,13 @@
(|> level
dec
(list.n/range 0)
- (list/map (|>> (n/+ (inc offset)) parameter-type-name)))))
+ (list;map (|>> (n/+ (inc offset)) parameter-type-name)))))
(def: (prefix-lines prefix lines)
(-> Text Text Text)
(|> lines
(text.split-all-with text.new-line)
- (list/map (|>> (format prefix)))
+ (list;map (|>> (format prefix)))
(text.join-with text.new-line)))
(def: (pprint-type-definition level type-func-info tags module signature? recursive-type? type)
@@ -106,7 +106,7 @@
(format "(primitive " (%t name) ")")
_
- (format "(primitive " (%t name) " " (|> params (list/map (pprint-type-definition level type-func-info #.None module signature? recursive-type?)) (text.join-with " ")) ")"))
+ (format "(primitive " (%t name) " " (|> params (list;map (pprint-type-definition level type-func-info #.None module signature? recursive-type?)) (text.join-with " ")) ")"))
[_ (#.Sum _)]
(let [members (type.flatten-variant type)]
@@ -114,20 +114,20 @@
#.Nil
(format "(| "
(|> members
- (list/map (pprint-type-definition level type-func-info #.None module signature? recursive-type?))
+ (list;map (pprint-type-definition level type-func-info #.None module signature? recursive-type?))
(text.join-with " "))
")")
_
(|> members
(list.zip2 tags)
- (list/map (function (_ [[_ t-name] type])
+ (list;map (function (_ [[_ t-name] type])
(case type
(#.Product _)
(let [types (type.flatten-tuple type)]
(format "(#" t-name " "
(|> types
- (list/map (pprint-type-definition level type-func-info #.None module signature? recursive-type?))
+ (list;map (pprint-type-definition level type-func-info #.None module signature? recursive-type?))
(text.join-with " "))
")"))
@@ -139,12 +139,12 @@
(let [members (type.flatten-tuple type)]
(case tags
#.Nil
- (format "[" (|> members (list/map (pprint-type-definition level type-func-info #.None module signature? recursive-type?)) (text.join-with " ")) "]")
+ (format "[" (|> members (list;map (pprint-type-definition level type-func-info #.None module signature? recursive-type?)) (text.join-with " ")) "]")
_
(let [member-docs (|> members
(list.zip2 tags)
- (list/map (function (_ [[_ t-name] type])
+ (list;map (function (_ [[_ t-name] type])
(if signature?
(format "(: " (pprint-type-definition level type-func-info #.None module signature? recursive-type? type) text.new-line " " t-name ")")
(format "#" t-name " " (pprint-type-definition level type-func-info #.None module signature? recursive-type? type)))))
@@ -155,7 +155,7 @@
[_ (#.Function input output)]
(let [[ins out] (type.flatten-function type)]
- (format "(-> " (|> ins (list/map (pprint-type-definition level type-func-info #.None module signature? recursive-type?)) (text.join-with " "))
+ (format "(-> " (|> ins (list;map (pprint-type-definition level type-func-info #.None module signature? recursive-type?)) (text.join-with " "))
" "
(pprint-type-definition level type-func-info #.None module signature? recursive-type? out)
")"))
@@ -190,10 +190,10 @@
[_ (#.Apply param fun)]
(let [[type-func type-arguments] (type.flatten-application type)]
- (format "(" (pprint-type-definition level type-func-info tags module signature? recursive-type? type-func) " " (|> type-arguments (list/map (pprint-type-definition level type-func-info #.None module signature? recursive-type?)) (text.join-with " ")) ")"))
+ (format "(" (pprint-type-definition level type-func-info tags module signature? recursive-type? type-func) " " (|> type-arguments (list;map (pprint-type-definition level type-func-info #.None module signature? recursive-type?)) (text.join-with " ")) ")"))
[_ (#.Named [_module _name] type)]
- (if (text/= module _module)
+ (if (text;= module _module)
_name
(%name [_module _name]))
)))
@@ -207,20 +207,20 @@
(format "(primitive " (%t name) ")")
_
- (format "(primitive " (%t name) " " (|> params (list/map (pprint-type level type-func-name module)) (list.interpose " ") (text.join-with "")) ")"))
+ (format "(primitive " (%t name) " " (|> params (list;map (pprint-type level type-func-name module)) (list.interpose " ") (text.join-with "")) ")"))
(#.Sum _)
(let [members (type.flatten-variant type)]
- (format "(| " (|> members (list/map (pprint-type level type-func-name module)) (list.interpose " ") (text.join-with "")) ")"))
+ (format "(| " (|> members (list;map (pprint-type level type-func-name module)) (list.interpose " ") (text.join-with "")) ")"))
(#.Product _)
(let [members (type.flatten-tuple type)]
- (format "[" (|> members (list/map (pprint-type level type-func-name module)) (list.interpose " ") (text.join-with "")) "]"))
+ (format "[" (|> members (list;map (pprint-type level type-func-name module)) (list.interpose " ") (text.join-with "")) "]"))
(#.Function input output)
(let [[ins out] (type.flatten-function type)]
(format "(-> "
- (|> ins (list/map (pprint-type level type-func-name module)) (list.interpose " ") (text.join-with ""))
+ (|> ins (list;map (pprint-type level type-func-name module)) (list.interpose " ") (text.join-with ""))
" "
(pprint-type level type-func-name module out)
")"))
@@ -247,10 +247,10 @@
(#.Apply param fun)
(let [[type-func type-arguments] (type.flatten-application type)]
- (format "(" (pprint-type level type-func-name module type-func) " " (|> type-arguments (list/map (pprint-type level type-func-name module)) (list.interpose " ") (text.join-with "")) ")"))
+ (format "(" (pprint-type level type-func-name module type-func) " " (|> type-arguments (list;map (pprint-type level type-func-name module)) (list.interpose " ") (text.join-with "")) ")"))
(#.Named [_module _name] type)
- (if (text/= module _module)
+ (if (text;= module _module)
_name
(%name [_module _name]))
))
@@ -268,7 +268,7 @@
(def: (lux-module? module-name)
(-> Text Bit)
- (or (text/= "lux" module-name)
+ (or (text;= "lux" module-name)
(text.starts-with? "lux/" module-name)))
(def: (add-definition [name [def-type def-annotations def-value]] organization)
@@ -299,9 +299,9 @@
(def: name-sort
(All [r] (-> [Text r] [Text r] Bit))
- (let [text/< (:: text.order <)]
+ (let [text;< (:: text.order <)]
(function (_ [n1 _] [n2 _])
- (text/< n1 n2))))
+ (text;< n1 n2))))
(def: (organize-definitions defs)
(-> (List [Text Definition]) Organization)
@@ -309,7 +309,7 @@
#macros (list)
#structures (list)
#values (list)}]
- (|> (list/fold add-definition init defs)
+ (|> (list;fold add-definition init defs)
(update@ #types (list.sort name-sort))
(update@ #macros (list.sort name-sort))
(update@ #structures (list.sort name-sort))
@@ -363,7 +363,7 @@
(when> recursive-type? [unrecurse-type])
(pprint-type-definition (dec nesting) [_name type-arguments] (maybe.default (list) tags) module signature? recursive-type?)
(text.split-all-with text.new-line)
- (list/map (|>> (format " ")))
+ (list;map (|>> (format " ")))
(text.join-with text.new-line))
")"))))
@@ -389,14 +389,14 @@
md.empty)
type-code)))))
types)]
- (wrap (list/fold (function.flip md.then)
+ (wrap (list;fold (function.flip md.then)
(md.heading/2 "Types")
type-docs))))
(def: (document-macros module-name names)
(-> Text (List [Text Code]) (Markdown Block))
(|> names
- (list/map (: (-> [Text Code] (Markdown Block))
+ (list;map (: (-> [Text Code] (Markdown Block))
(function (_ [name def-annotations])
($_ md.then
(md.heading/3 name)
@@ -405,7 +405,7 @@
(do maybe.monad
[documentation (macro.get-documentation def-annotations)]
(wrap (md.code documentation))))))))
- (list/fold (function.flip md.then)
+ (list;fold (function.flip md.then)
(md.heading/2 "Macros"))))
(do-template [<singular> <plural> <header>]
@@ -416,7 +416,7 @@
(def: (<plural> module values)
(-> Text (List Value) (Markdown Block))
(|> values
- (list/map (function (_ [name def-annotations value-type])
+ (list;map (function (_ [name def-annotations value-type])
(let [?doc (macro.get-documentation def-annotations)
usage (case (macro.function-arguments def-annotations)
#.Nil
@@ -433,7 +433,7 @@
_
md.empty)
(<singular> module value-type)))))
- (list/fold (function.flip md.then)
+ (list;fold (function.flip md.then)
(md.heading/2 <header>))))]
[document-structure document-structures "Structures"]
@@ -444,7 +444,7 @@
(-> [Text Text] Text Text)
(|> block
(text.split-all-with text.new-line)
- (list/map (text.enclose pre+post))
+ (list;map (text.enclose pre+post))
(text.join-with text.new-line)))
(def: (document-module [[module-name module] organization])
@@ -502,7 +502,7 @@
(list.sort name-sort))]
lux-exports (monad.map @ (function.compose macro.exports product.left)
lux-modules)
- module-documentation (|> (list/map organize-definitions lux-exports)
+ module-documentation (|> (list;map organize-definitions lux-exports)
(list.zip2 lux-modules)
(monad.map @ document-module))
#let [_ (io.run (monad.map io.monad save-documentation! module-documentation))]]