diff options
author | Eduardo Julian | 2022-07-09 14:35:38 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-07-09 14:35:38 -0400 |
commit | 7db42ab1b9d3c764772ca63c74bf44bb2b8b8325 (patch) | |
tree | bd1c865dea0902790f3e462cec4f9bc8d8ae428f /stdlib/source/documentation | |
parent | fc2737b5226eda69c12bc593e83e22ed54e4d3af (diff) |
First-class programs instead of having a "lux program" extension.
Diffstat (limited to 'stdlib/source/documentation')
-rw-r--r-- | stdlib/source/documentation/lux.lux | 7 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/program.lux | 20 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/test.lux | 2 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/world.lux | 1 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/world/net.lux | 1 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/world/net/uri.lux | 1 |
6 files changed, 16 insertions, 16 deletions
diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux index 086a7212f..947fec8a1 100644 --- a/stdlib/source/documentation/lux.lux +++ b/stdlib/source/documentation/lux.lux @@ -1,7 +1,7 @@ (.require [library [lux - [program (.only program:)] + [program (.only program)] ["$" documentation] ["[0]" debug] [control @@ -893,5 +893,6 @@ /test.documentation /world.documentation]))) -(program: inputs - (io.io (debug.log! ($.markdown ..documentation)))) +(def _ + (program inputs + (io.io (debug.log! ($.markdown ..documentation))))) diff --git a/stdlib/source/documentation/lux/program.lux b/stdlib/source/documentation/lux/program.lux index 60f433db2..bc126a34a 100644 --- a/stdlib/source/documentation/lux/program.lux +++ b/stdlib/source/documentation/lux/program.lux @@ -53,16 +53,18 @@ (.List $.Module) ($.module /._ "" - [($.definition /.program: + [($.definition /.program "Defines the entry-point to a program (similar to the 'main' function/method in other programming languages)." ["Can take a list of all the input parameters to the program." - (program: all_arguments - (do io.monad - [foo (initialize program)] - (do_something_with all_arguments)))] + (def _ + (program all_arguments + (do io.monad + [foo (initialize program)] + (do_something_with all_arguments))))] ["Can also parse them using CLI parsers from the library/lux/control/parser/cli module." - (program: [config configuration_parser] - (do io.monad - [data (initialize program with config)] - (do_something_with data)))])] + (def _ + (program [config configuration_parser] + (do io.monad + [data (initialize program with config)] + (do_something_with data))))])] [..\\parser])) diff --git a/stdlib/source/documentation/lux/test.lux b/stdlib/source/documentation/lux/test.lux index c66aa8eac..467b04150 100644 --- a/stdlib/source/documentation/lux/test.lux +++ b/stdlib/source/documentation/lux/test.lux @@ -67,7 +67,7 @@ ($.definition /.run! (format "Executes a test, and exits the program with either a successful or a failing exit code." - \n "WARNING: This procedure is only meant to be used in (program: ...) forms.") + \n "WARNING: This procedure is only meant to be used in (program ...) forms.") [(run! test)]) ($.definition /.coverage' diff --git a/stdlib/source/documentation/lux/world.lux b/stdlib/source/documentation/lux/world.lux index 795612a5e..2e3dd6945 100644 --- a/stdlib/source/documentation/lux/world.lux +++ b/stdlib/source/documentation/lux/world.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - [program (.only program:)] ["$" documentation] ["[0]" debug] [control diff --git a/stdlib/source/documentation/lux/world/net.lux b/stdlib/source/documentation/lux/world/net.lux index 1bc599540..6ec146ddf 100644 --- a/stdlib/source/documentation/lux/world/net.lux +++ b/stdlib/source/documentation/lux/world/net.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - [program (.only program:)] ["$" documentation] ["[0]" debug] [control diff --git a/stdlib/source/documentation/lux/world/net/uri.lux b/stdlib/source/documentation/lux/world/net/uri.lux index ab808ab5f..525dacf19 100644 --- a/stdlib/source/documentation/lux/world/net/uri.lux +++ b/stdlib/source/documentation/lux/world/net/uri.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - [program (.only program:)] ["$" documentation] ["[0]" debug] [control |