aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation
diff options
context:
space:
mode:
authorEduardo Julian2022-06-29 03:15:23 -0400
committerEduardo Julian2022-06-29 03:15:23 -0400
commit664e02d1b5e5aa479869c4e17ec4128f5cfd04e2 (patch)
tree7111d48d8a728ea30abfb6adb104425f61d65585 /stdlib/source/documentation
parent5232f0701cd95f260005a65d220a361dd71b6b96 (diff)
New "parser" hierarchy. [Part 6]
Diffstat (limited to 'stdlib/source/documentation')
-rw-r--r--stdlib/source/documentation/lux/world.lux6
-rw-r--r--stdlib/source/documentation/lux/world/console.lux40
-rw-r--r--stdlib/source/documentation/lux/world/environment.lux31
-rw-r--r--stdlib/source/documentation/lux/world/file.lux87
-rw-r--r--stdlib/source/documentation/lux/world/file/watch.lux57
-rw-r--r--stdlib/source/documentation/lux/world/input/keyboard.lux20
-rw-r--r--stdlib/source/documentation/lux/world/net.lux25
-rw-r--r--stdlib/source/documentation/lux/world/net/http/client.lux52
-rw-r--r--stdlib/source/documentation/lux/world/net/http/status.lux232
-rw-r--r--stdlib/source/documentation/lux/world/net/uri.lux15
-rw-r--r--stdlib/source/documentation/lux/world/output/video/resolution.lux86
-rw-r--r--stdlib/source/documentation/lux/world/program.lux34
-rw-r--r--stdlib/source/documentation/lux/world/shell.lux57
13 files changed, 303 insertions, 439 deletions
diff --git a/stdlib/source/documentation/lux/world.lux b/stdlib/source/documentation/lux/world.lux
index 2bcdaf3b3..7376eb311 100644
--- a/stdlib/source/documentation/lux/world.lux
+++ b/stdlib/source/documentation/lux/world.lux
@@ -2,7 +2,7 @@
[library
[lux (.except)
[program (.only program:)]
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
["[0]" debug]
[control
["[0]" io]]
@@ -18,7 +18,7 @@
["[1][0]" output
["[1]/[0]" video
["[1]/[0]" resolution]]]
- ["[1][0]" program]
+ ["[1][0]" environment]
["[1][0]" shell]])
(.def .public documentation
@@ -29,5 +29,5 @@
/input/keyboard.documentation
/net.documentation
/output/video/resolution.documentation
- /program.documentation
+ /environment.documentation
/shell.documentation))
diff --git a/stdlib/source/documentation/lux/world/console.lux b/stdlib/source/documentation/lux/world/console.lux
index 9c5004ae1..44376fa63 100644
--- a/stdlib/source/documentation/lux/world/console.lux
+++ b/stdlib/source/documentation/lux/world/console.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
["@" target]
[data
["[0]" text (.only \n)
@@ -11,32 +11,28 @@
[\\library
["[0]" /]])
-(documentation: (/.Console !)
- "An interface to console/terminal I/O.")
-
-(documentation: /.write_line
- "Writes the message on the console and appends a new-line/line-feed at the end."
- [(write_line message console)])
-
-(documentation: (/.Mock s)
- (format "A mock/simulation of a console."
- \n "Useful for testing."))
-
-(documentation: /.mock
- ""
- [(mock mock init)])
-
(.def .public documentation
(.List $.Module)
(`` (`` ($.module /._
""
- [..Console
- ..write_line
- ..Mock
- ..mock
- ($.default /.async)
+ [($.default /.async)
(~~ (for @.jvm (~~ (these ($.default /.cannot_open)
($.default /.cannot_close)
($.default /.default)))
- (~~ (these))))]
+ (~~ (these))))
+
+ ($.documentation (/.Console !)
+ "An interface to console/terminal I/O.")
+
+ ($.documentation /.write_line
+ "Writes the message on the console and appends a new-line/line-feed at the end."
+ [(write_line message console)])
+
+ ($.documentation (/.Mock s)
+ (format "A mock/simulation of a console."
+ \n "Useful for testing."))
+
+ ($.documentation /.mock
+ ""
+ [(mock mock init)])]
[]))))
diff --git a/stdlib/source/documentation/lux/world/environment.lux b/stdlib/source/documentation/lux/world/environment.lux
new file mode 100644
index 000000000..b8663936b
--- /dev/null
+++ b/stdlib/source/documentation/lux/world/environment.lux
@@ -0,0 +1,31 @@
+(.require
+ [library
+ [lux (.except)
+ ["$" documentation]
+ [data
+ ["[0]" text (.only \n)
+ ["%" \\format (.only format)]]]
+ [macro
+ ["[0]" template]]]]
+ [\\library
+ ["[0]" /]])
+
+(.def .public documentation
+ (.List $.Module)
+ ($.module /._
+ ""
+ [($.default /.unknown_environment_variable)
+ ($.default /.async)
+ ($.default /.default)
+
+ ($.documentation (/.Environment !)
+ "Access to ambient environment data and the capacity to exit the program.")
+
+ ($.documentation /.environment
+ "Assembles the environment variables available to the program."
+ [(environment monad program)])
+
+ ($.documentation /.mock
+ ""
+ [(mock environment home directory)])]
+ []))
diff --git a/stdlib/source/documentation/lux/world/file.lux b/stdlib/source/documentation/lux/world/file.lux
index 753ebd8ea..3ae7449e6 100644
--- a/stdlib/source/documentation/lux/world/file.lux
+++ b/stdlib/source/documentation/lux/world/file.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
["@" target]
[data
["[0]" text (.only \n)
@@ -13,61 +13,52 @@
["[0]" /
["[1][0]" watch]])
-(documentation: /.Path
- "A path to a file or a directory in a file-system.")
-
-(documentation: (/.System !)
- "An interface to a file-system.")
-
-(documentation: /.parent
- "If a path represents a nested file/directory, extracts its parent directory."
- [(parent fs path)])
-
-(documentation: /.name
- "The un-nested name of a file/directory."
- [(name fs path)])
-
-(documentation: /.rooted
- "A nested path for a file/directory, given a root/parent path and a file/directory name within it."
- [(rooted fs parent child)])
-
-(documentation: /.exists?
- "Checks if either a file or a directory exists at the given path."
- [(exists? monad fs path)])
-
-(documentation: /.mock
- (format "A purely in-memory simulation of a file-system."
- \n "Useful for testing.")
- [(mock separator)])
-
-(documentation: /.make_directories
- (format "Creates the directory specified by the given path."
- \n "Also, creates every super-directory necessary to make the given path valid.")
- [(make_directories monad fs path)])
-
-(documentation: /.make_file
- "Creates a new file with the given content if-and-only-if the file does not already exist."
- [(make_file monad fs content path)])
-
(.def .public documentation
(.List $.Module)
(`` (`` ($.module /._
""
- [..Path
- ..System
- ..parent
- ..name
- ..rooted
- ..exists?
- ..mock
- ..make_directories
- ..make_file
- ($.default /.async)
+ [($.default /.async)
($.default /.cannot_make_file)
($.default /.cannot_find_file)
($.default /.cannot_delete)
($.default /.cannot_make_directory)
($.default /.cannot_find_directory)
(~~ (for @.lua (~~ (these))
- (~~ (these ($.default /.default)))))]
+ (~~ (these ($.default /.default)))))
+
+ ($.documentation /.Path
+ "A path to a file or a directory in a file-system.")
+
+ ($.documentation (/.System !)
+ "An interface to a file-system.")
+
+ ($.documentation /.parent
+ "If a path represents a nested file/directory, extracts its parent directory."
+ [(parent fs path)])
+
+ ($.documentation /.name
+ "The un-nested name of a file/directory."
+ [(name fs path)])
+
+ ($.documentation /.rooted
+ "A nested path for a file/directory, given a root/parent path and a file/directory name within it."
+ [(rooted fs parent child)])
+
+ ($.documentation /.exists?
+ "Checks if either a file or a directory exists at the given path."
+ [(exists? monad fs path)])
+
+ ($.documentation /.mock
+ (format "A purely in-memory simulation of a file-system."
+ \n "Useful for testing.")
+ [(mock separator)])
+
+ ($.documentation /.make_directories
+ (format "Creates the directory specified by the given path."
+ \n "Also, creates every super-directory necessary to make the given path valid.")
+ [(make_directories monad fs path)])
+
+ ($.documentation /.make_file
+ "Creates a new file with the given content if-and-only-if the file does not already exist."
+ [(make_file monad fs content path)])]
[/watch.documentation]))))
diff --git a/stdlib/source/documentation/lux/world/file/watch.lux b/stdlib/source/documentation/lux/world/file/watch.lux
index 94ec46172..c4c3f371c 100644
--- a/stdlib/source/documentation/lux/world/file/watch.lux
+++ b/stdlib/source/documentation/lux/world/file/watch.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
["@" target]
[data
["[0]" text (.only \n)
@@ -11,40 +11,11 @@
[\\library
["[0]" /]])
-(documentation: /.Concern
- "A particular concern to watch-out for.")
-
-(documentation: /.also
- ""
- [(also left right)])
-
-(documentation: (/.Watcher !)
- "Machinery for watching a file-system for changes to files and directories.")
-
-(documentation: /.polling
- (format "A simple watcher that works for any file-system."
- "Polls files and directories to detect changes.")
- [(polling fs)])
-
-(documentation: /.mock
- (format "A fake/emulated watcher."
- \n "Must be given a path separator for the file-system.")
- [(mock separator)])
-
-(for @.jvm (these (documentation: /.default
- "The default watcher for the default file-system."))
- (these))
-
(.def .public documentation
(.List $.Module)
(`` (`` ($.module /._
""
- [..Concern
- ..also
- ..Watcher
- ..polling
- ..mock
- ($.default /.creation)
+ [($.default /.creation)
($.default /.creation?)
($.default /.modification)
($.default /.modification?)
@@ -53,6 +24,28 @@
($.default /.all)
($.default /.not_being_watched)
($.default /.cannot_poll_a_non_existent_directory)
- (~~ (for @.jvm (~~ (these ..default))
+
+ ($.documentation /.Concern
+ "A particular concern to watch-out for.")
+
+ ($.documentation /.also
+ ""
+ [(also left right)])
+
+ ($.documentation (/.Watcher !)
+ "Machinery for watching a file-system for changes to files and directories.")
+
+ ($.documentation /.polling
+ (format "A simple watcher that works for any file-system."
+ "Polls files and directories to detect changes.")
+ [(polling fs)])
+
+ ($.documentation /.mock
+ (format "A fake/emulated watcher."
+ \n "Must be given a path separator for the file-system.")
+ [(mock separator)])
+
+ (~~ (for @.jvm (~~ (these ($.documentation /.default
+ "The default watcher for the default file-system.")))
(~~ (these))))]
[]))))
diff --git a/stdlib/source/documentation/lux/world/input/keyboard.lux b/stdlib/source/documentation/lux/world/input/keyboard.lux
index 86011916c..33e98ac17 100644
--- a/stdlib/source/documentation/lux/world/input/keyboard.lux
+++ b/stdlib/source/documentation/lux/world/input/keyboard.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
["[0]" text (.only \n)
["%" \\format (.only format)]]]
@@ -10,19 +10,11 @@
[\\library
["[0]" /]])
-(documentation: /.Key
- "A key from a keyboard, identify by a numeric ID.")
-
-(documentation: /.Press
- "A key-press for a key.")
-
(.def .public documentation
(.List $.Module)
($.module /._
""
- [..Key
- ..Press
- ($.default /.back_space)
+ [($.default /.back_space)
($.default /.enter)
($.default /.shift)
($.default /.control)
@@ -105,5 +97,11 @@
($.default /.f23)
($.default /.f24)
($.default /.release)
- ($.default /.press)]
+ ($.default /.press)
+
+ ($.documentation /.Key
+ "A key from a keyboard, identify by a numeric ID.")
+
+ ($.documentation /.Press
+ "A key-press for a key.")]
[]))
diff --git a/stdlib/source/documentation/lux/world/net.lux b/stdlib/source/documentation/lux/world/net.lux
index 2ef8db1be..5f309dcb4 100644
--- a/stdlib/source/documentation/lux/world/net.lux
+++ b/stdlib/source/documentation/lux/world/net.lux
@@ -2,7 +2,7 @@
[library
[lux (.except)
[program (.only program:)]
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
["[0]" debug]
[control
["[0]" io]]]]
@@ -14,23 +14,20 @@
["[1]/[0]" client]
["[1]/[0]" status]]])
-(documentation: /.Address
- "A TCP/IP address.")
-
-(documentation: /.Port
- "A TCP/IP port.")
-
-(documentation: /.URL
- "A Uniform Resource Locator.")
-
(.def .public documentation
(.List $.Module)
($.module /._
""
- [..Address
- ..Port
- ..URL
- ($.default /.Location)]
+ [($.default /.Location)
+
+ ($.documentation /.Address
+ "A TCP/IP address.")
+
+ ($.documentation /.Port
+ "A TCP/IP port.")
+
+ ($.documentation /.URL
+ "A Uniform Resource Locator.")]
[/uri.documentation
/http/client.documentation
/http/status.documentation]))
diff --git a/stdlib/source/documentation/lux/world/net/http/client.lux b/stdlib/source/documentation/lux/world/net/http/client.lux
index 27cb1e449..c0a113a36 100644
--- a/stdlib/source/documentation/lux/world/net/http/client.lux
+++ b/stdlib/source/documentation/lux/world/net/http/client.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
["@" target]
[data
["[0]" text (.only \n)
@@ -11,40 +11,30 @@
[\\library
["[0]" /]])
-(documentation: (/.Client !)
- "A HTTP client capable of issuing requests to a HTTP server.")
-
-(with_template [<name>]
- [(documentation: <name>
- (format "A " (text.upper_cased (template.text [<name>])) " request."))]
-
- [/.post]
- [/.get]
- [/.put]
- [/.patch]
- [/.delete]
- [/.head]
- [/.connect]
- [/.options]
- [/.trace]
- )
-
(.def .public documentation
(.List $.Module)
(`` (`` ($.module /._
""
- [..Client
- ..post
- ..get
- ..put
- ..patch
- ..delete
- ..head
- ..connect
- ..options
- ..trace
- ($.default /.async)
+ [($.default /.async)
($.default /.headers)
(~~ (for @.jvm (~~ (these ($.default /.default)))
- (~~ (these))))]
+ (~~ (these))))
+
+ ($.documentation (/.Client !)
+ "A HTTP client capable of issuing requests to a HTTP server.")
+
+ (~~ (with_template [<name>]
+ [($.documentation <name>
+ (format "A " (text.upper_cased (template.text [<name>])) " request."))]
+
+ [/.post]
+ [/.get]
+ [/.put]
+ [/.patch]
+ [/.delete]
+ [/.head]
+ [/.connect]
+ [/.options]
+ [/.trace]
+ ))]
[]))))
diff --git a/stdlib/source/documentation/lux/world/net/http/status.lux b/stdlib/source/documentation/lux/world/net/http/status.lux
index 1999f23e9..3d34f709a 100644
--- a/stdlib/source/documentation/lux/world/net/http/status.lux
+++ b/stdlib/source/documentation/lux/world/net/http/status.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
["[0]" text (.only \n)
["%" \\format (.only format)]]]
@@ -10,159 +10,87 @@
[\\library
["[0]" /]])
-(with_template [<name>]
- [(documentation: <name>
- (|> (template.text [<name>])
- (text.replaced "_" " ")
- text.upper_cased
- (format (%.nat <name>) ": ")))]
+(`` (.def .public documentation
+ (.List $.Module)
+ ($.module /._
+ ""
+ [(~~ (with_template [<name>]
+ [($.documentation <name>
+ (|> (template.text [<name>])
+ (text.replaced "_" " ")
+ text.upper_cased
+ (format (%.nat <name>) ": ")))]
- ... 1xx Informational response
- [/.continue]
- [/.switching_protocols]
- [/.processing]
- [/.early_hints]
+ ... 1xx Informational response
+ [/.continue]
+ [/.switching_protocols]
+ [/.processing]
+ [/.early_hints]
- ... 2xx Success
- [/.ok]
- [/.created]
- [/.accepted]
- [/.non_authoritative_information]
- [/.no_content]
- [/.reset_content]
- [/.partial_content]
- [/.multi_status]
- [/.already_reported]
- [/.im_used]
+ ... 2xx Success
+ [/.ok]
+ [/.created]
+ [/.accepted]
+ [/.non_authoritative_information]
+ [/.no_content]
+ [/.reset_content]
+ [/.partial_content]
+ [/.multi_status]
+ [/.already_reported]
+ [/.im_used]
- ... 3xx Redirection
- [/.multiple_choices]
- [/.moved_permanently]
- [/.found]
- [/.see_other]
- [/.not_modified]
- [/.use_proxy]
- [/.switch_proxy]
- [/.temporary_redirect]
- [/.permanent_redirect]
+ ... 3xx Redirection
+ [/.multiple_choices]
+ [/.moved_permanently]
+ [/.found]
+ [/.see_other]
+ [/.not_modified]
+ [/.use_proxy]
+ [/.switch_proxy]
+ [/.temporary_redirect]
+ [/.permanent_redirect]
- ... 4xx Client errors
- [/.bad_request]
- [/.unauthorized]
- [/.payment_required]
- [/.forbidden]
- [/.not_found]
- [/.method_not_allowed]
- [/.not_acceptable]
- [/.proxy_authentication_required]
- [/.request_timeout]
- [/.conflict]
- [/.gone]
- [/.length_required]
- [/.precondition_failed]
- [/.payload_too_large]
- [/.uri_too_long]
- [/.unsupported_media_type]
- [/.range_not_satisfiable]
- [/.expectation_failed]
- [/.im_a_teapot]
- [/.misdirected_request]
- [/.unprocessable_entity]
- [/.locked]
- [/.failed_dependency]
- [/.upgrade_required]
- [/.precondition_required]
- [/.too_many_requests]
- [/.request_header_fields_too_large]
- [/.unavailable_for_legal_reasons]
+ ... 4xx Client errors
+ [/.bad_request]
+ [/.unauthorized]
+ [/.payment_required]
+ [/.forbidden]
+ [/.not_found]
+ [/.method_not_allowed]
+ [/.not_acceptable]
+ [/.proxy_authentication_required]
+ [/.request_timeout]
+ [/.conflict]
+ [/.gone]
+ [/.length_required]
+ [/.precondition_failed]
+ [/.payload_too_large]
+ [/.uri_too_long]
+ [/.unsupported_media_type]
+ [/.range_not_satisfiable]
+ [/.expectation_failed]
+ [/.im_a_teapot]
+ [/.misdirected_request]
+ [/.unprocessable_entity]
+ [/.locked]
+ [/.failed_dependency]
+ [/.upgrade_required]
+ [/.precondition_required]
+ [/.too_many_requests]
+ [/.request_header_fields_too_large]
+ [/.unavailable_for_legal_reasons]
- ... 5xx Server errors
- [/.internal_server_error]
- [/.not_implemented]
- [/.bad_gateway]
- [/.service_unavailable]
- [/.gateway_timeout]
- [/.http_version_not_supported]
- [/.variant_also_negotiates]
- [/.insufficient_storage]
- [/.loop_detected]
- [/.not_extended]
- [/.network_authentication_required]
- )
-
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [ ... 1xx Informational response
- ..continue
- ..switching_protocols
- ..processing
- ..early_hints
-
- ... 2xx Success
- ..ok
- ..created
- ..accepted
- ..non_authoritative_information
- ..no_content
- ..reset_content
- ..partial_content
- ..multi_status
- ..already_reported
- ..im_used
-
- ... 3xx Redirection
- ..multiple_choices
- ..moved_permanently
- ..found
- ..see_other
- ..not_modified
- ..use_proxy
- ..switch_proxy
- ..temporary_redirect
- ..permanent_redirect
-
- ... 4xx Client errors
- ..bad_request
- ..unauthorized
- ..payment_required
- ..forbidden
- ..not_found
- ..method_not_allowed
- ..not_acceptable
- ..proxy_authentication_required
- ..request_timeout
- ..conflict
- ..gone
- ..length_required
- ..precondition_failed
- ..payload_too_large
- ..uri_too_long
- ..unsupported_media_type
- ..range_not_satisfiable
- ..expectation_failed
- ..im_a_teapot
- ..misdirected_request
- ..unprocessable_entity
- ..locked
- ..failed_dependency
- ..upgrade_required
- ..precondition_required
- ..too_many_requests
- ..request_header_fields_too_large
- ..unavailable_for_legal_reasons
-
- ... 5xx Server errors
- ..internal_server_error
- ..not_implemented
- ..bad_gateway
- ..service_unavailable
- ..gateway_timeout
- ..http_version_not_supported
- ..variant_also_negotiates
- ..insufficient_storage
- ..loop_detected
- ..not_extended
- ..network_authentication_required]
- []))
+ ... 5xx Server errors
+ [/.internal_server_error]
+ [/.not_implemented]
+ [/.bad_gateway]
+ [/.service_unavailable]
+ [/.gateway_timeout]
+ [/.http_version_not_supported]
+ [/.variant_also_negotiates]
+ [/.insufficient_storage]
+ [/.loop_detected]
+ [/.not_extended]
+ [/.network_authentication_required]
+ ))]
+ [])))
diff --git a/stdlib/source/documentation/lux/world/net/uri.lux b/stdlib/source/documentation/lux/world/net/uri.lux
index c96fa1ec5..64aadc1fd 100644
--- a/stdlib/source/documentation/lux/world/net/uri.lux
+++ b/stdlib/source/documentation/lux/world/net/uri.lux
@@ -2,23 +2,20 @@
[library
[lux (.except)
[program (.only program:)]
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
["[0]" debug]
[control
["[0]" io]]]]
[\\library
["[0]" /]])
-(documentation: /.URI
- "A Uniform Resource Identifier.")
-
-(documentation: /.separator
- "A separator for the pieces of a URI.")
-
(.def .public documentation
(.List $.Module)
($.module /._
""
- [..URI
- ..separator]
+ [($.documentation /.URI
+ "A Uniform Resource Identifier.")
+
+ ($.documentation /.separator
+ "A separator for the pieces of a URI.")]
[]))
diff --git a/stdlib/source/documentation/lux/world/output/video/resolution.lux b/stdlib/source/documentation/lux/world/output/video/resolution.lux
index 97d312c77..6efada0de 100644
--- a/stdlib/source/documentation/lux/world/output/video/resolution.lux
+++ b/stdlib/source/documentation/lux/world/output/video/resolution.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
["[0]" text (.only \n)
["%" \\format (.only format)]]]
@@ -10,56 +10,40 @@
[\\library
["[0]" /]])
-(documentation: /.Resolution
- "A screen resolution.")
+(`` (.def .public documentation
+ (.List $.Module)
+ ($.module /._
+ ""
+ [($.default /.hash)
+ ($.default /.equivalence)
-(with_template [<name>]
- [(documentation: <name>
- (let [name (|> (template.text [<name>])
- (text.replaced "_" " ")
- text.upper_cased)]
- (format name " resolution: "
- (%.nat (the /.#width <name>))
- "x" (%.nat (the /.#height <name>))
- ".")))]
+ ($.documentation /.Resolution
+ "A screen resolution.")
- [/.svga]
- [/.wsvga]
- [/.xga]
- [/.xga+]
- [/.wxga_16:9]
- [/.wxga_5:3]
- [/.wxga_16:10]
- [/.sxga]
- [/.wxga+]
- [/.hd+]
- [/.wsxga+]
- [/.fhd]
- [/.wuxga]
- [/.wqhd]
- [/.uhd_4k]
- )
+ (~~ (with_template [<name>]
+ [($.documentation <name>
+ (let [name (|> (template.text [<name>])
+ (text.replaced "_" " ")
+ text.upper_cased)]
+ (format name " resolution: "
+ (%.nat (the /.#width <name>))
+ "x" (%.nat (the /.#height <name>))
+ ".")))]
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [..Resolution
- ..svga
- ..wsvga
- ..xga
- ..xga+
- ..wxga_16:9
- ..wxga_5:3
- ..wxga_16:10
- ..sxga
- ..wxga+
- ..hd+
- ..wsxga+
- ..fhd
- ..wuxga
- ..wqhd
- ..uhd_4k
- ($.default /.hash)
- ($.default /.equivalence)]
- []))
+ [/.svga]
+ [/.wsvga]
+ [/.xga]
+ [/.xga+]
+ [/.wxga_16:9]
+ [/.wxga_5:3]
+ [/.wxga_16:10]
+ [/.sxga]
+ [/.wxga+]
+ [/.hd+]
+ [/.wsxga+]
+ [/.fhd]
+ [/.wuxga]
+ [/.wqhd]
+ [/.uhd_4k]
+ ))]
+ [])))
diff --git a/stdlib/source/documentation/lux/world/program.lux b/stdlib/source/documentation/lux/world/program.lux
deleted file mode 100644
index 0e932c07d..000000000
--- a/stdlib/source/documentation/lux/world/program.lux
+++ /dev/null
@@ -1,34 +0,0 @@
-(.require
- [library
- [lux (.except)
- ["$" documentation (.only documentation:)]
- [data
- ["[0]" text (.only \n)
- ["%" \\format (.only format)]]]
- [macro
- ["[0]" template]]]]
- [\\library
- ["[0]" /]])
-
-(documentation: (/.Program !)
- "Access to ambient program data and the capacity to exit the program.")
-
-(documentation: /.environment
- "Assembles the environment variables available to the program."
- [(environment monad program)])
-
-(documentation: /.mock
- ""
- [(mock environment home directory)])
-
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [..Program
- ..environment
- ..mock
- ($.default /.unknown_environment_variable)
- ($.default /.async)
- ($.default /.default)]
- []))
diff --git a/stdlib/source/documentation/lux/world/shell.lux b/stdlib/source/documentation/lux/world/shell.lux
index b2ad55851..d6ae9df5f 100644
--- a/stdlib/source/documentation/lux/world/shell.lux
+++ b/stdlib/source/documentation/lux/world/shell.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
["@" target]
[data
["[0]" text (.only \n)
@@ -11,43 +11,36 @@
[\\library
["[0]" /]])
-(documentation: /.Exit
- "A program exit code.")
-
-(documentation: (/.Process !)
- "The means for communicating with a program/process being executed by the operating system.")
-
-(documentation: /.Command
- "A command that can be executed by the operating system.")
-
-(documentation: /.Argument
- "A parameter for a command.")
-
-(documentation: (/.Shell !)
- "The means for issuing commands to the operating system.")
-
-(documentation: (/.Mock s)
- "A simulated process.")
-
-(documentation: /.mock
- ""
- [(mock mock init)])
-
(.def .public documentation
(.List $.Module)
(`` (`` ($.module /._
""
- [..Exit
- ..Process
- ..Command
- ..Argument
- ..Shell
- ..Mock
- ..mock
- ($.default /.normal)
+ [($.default /.normal)
($.default /.error)
($.default /.async)
(~~ (for @.jvm (~~ (these ($.default /.no_more_output)
($.default /.default)))
- (~~ (these))))]
+ (~~ (these))))
+
+ ($.documentation /.Exit
+ "A program exit code.")
+
+ ($.documentation (/.Process !)
+ "The means for communicating with a program/process being executed by the operating system.")
+
+ ($.documentation /.Command
+ "A command that can be executed by the operating system.")
+
+ ($.documentation /.Argument
+ "A parameter for a command.")
+
+ ($.documentation (/.Shell !)
+ "The means for issuing commands to the operating system.")
+
+ ($.documentation (/.Mock s)
+ "A simulated process.")
+
+ ($.documentation /.mock
+ ""
+ [(mock mock init)])]
[]))))