aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/documentation')
-rw-r--r--stdlib/source/documentation/lux/locale.lux22
-rw-r--r--stdlib/source/documentation/lux/locale/language.lux13
-rw-r--r--stdlib/source/documentation/lux/locale/territory.lux13
-rw-r--r--stdlib/source/documentation/lux/macro.lux155
-rw-r--r--stdlib/source/documentation/lux/macro/code.lux22
-rw-r--r--stdlib/source/documentation/lux/macro/local.lux21
-rw-r--r--stdlib/source/documentation/lux/macro/syntax.lux40
-rw-r--r--stdlib/source/documentation/lux/macro/syntax/check.lux13
-rw-r--r--stdlib/source/documentation/lux/macro/syntax/declaration.lux26
-rw-r--r--stdlib/source/documentation/lux/macro/syntax/definition.lux31
-rw-r--r--stdlib/source/documentation/lux/macro/syntax/export.lux13
-rw-r--r--stdlib/source/documentation/lux/macro/syntax/input.lux20
-rw-r--r--stdlib/source/documentation/lux/macro/syntax/type/variable.lux20
-rw-r--r--stdlib/source/documentation/lux/macro/template.lux100
14 files changed, 236 insertions, 273 deletions
diff --git a/stdlib/source/documentation/lux/locale.lux b/stdlib/source/documentation/lux/locale.lux
index 806194704..b03601d73 100644
--- a/stdlib/source/documentation/lux/locale.lux
+++ b/stdlib/source/documentation/lux/locale.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except char)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
[text
["%" \\format (.only format)]]
@@ -13,21 +13,19 @@
[\\library
["[0]" /]])
-(documentation: /.Locale
- "A description of a locale; with territory, (optional) language, and (optional) text-encoding.")
-
-(documentation: /.locale
- ""
- [(locale language territory encoding)])
-
(.def .public documentation
(.List $.Module)
($.module /._
""
- [..Locale
- ..locale
- ($.default /.code)
+ [($.default /.code)
($.default /.hash)
- ($.default /.equivalence)]
+ ($.default /.equivalence)
+
+ ($.documentation /.Locale
+ "A description of a locale; with territory, (optional) language, and (optional) text-encoding.")
+
+ ($.documentation /.locale
+ ""
+ [(locale language territory encoding)])]
[/language.documentation
/territory.documentation]))
diff --git a/stdlib/source/documentation/lux/locale/language.lux b/stdlib/source/documentation/lux/locale/language.lux
index 1960e7fb9..cc0f4e7be 100644
--- a/stdlib/source/documentation/lux/locale/language.lux
+++ b/stdlib/source/documentation/lux/locale/language.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except char)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
[text
["%" \\format (.only format)]]
@@ -10,9 +10,6 @@
[\\library
["[0]" /]])
-(documentation: /.Language
- "An ISO 639 language.")
-
(def items/~
(list.together
(list ($.default /.uncoded)
@@ -625,8 +622,7 @@
(.List $.Module)
(`` ($.module /._
""
- [..Language
- ($.default /.name)
+ [($.default /.name)
($.default /.code)
($.default /.equivalence)
($.default /.hash)
@@ -656,5 +652,8 @@
..items/w
..items/x
..items/y
- ..items/z]
+ ..items/z
+
+ ($.documentation /.Language
+ "An ISO 639 language.")]
[])))
diff --git a/stdlib/source/documentation/lux/locale/territory.lux b/stdlib/source/documentation/lux/locale/territory.lux
index 2b83e0aa0..232f18038 100644
--- a/stdlib/source/documentation/lux/locale/territory.lux
+++ b/stdlib/source/documentation/lux/locale/territory.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except char)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
[text
["%" \\format (.only format)]]
@@ -10,9 +10,6 @@
[\\library
["[0]" /]])
-(documentation: /.Territory
- "An ISO 3166 territory.")
-
(def items/ab
(list.together
(list ($.default /.afghanistan)
@@ -304,8 +301,7 @@
(.List $.Module)
(`` ($.module /._
""
- [..Territory
- ($.default /.name)
+ [($.default /.name)
($.default /.short_code)
($.default /.long_code)
($.default /.numeric_code)
@@ -317,5 +313,8 @@
..items/hijkl
..items/mno
..items/pqrs
- ..items/tuvwxyz]
+ ..items/tuvwxyz
+
+ ($.documentation /.Territory
+ "An ISO 3166 territory.")]
[])))
diff --git a/stdlib/source/documentation/lux/macro.lux b/stdlib/source/documentation/lux/macro.lux
index e3a659da5..7e6c34963 100644
--- a/stdlib/source/documentation/lux/macro.lux
+++ b/stdlib/source/documentation/lux/macro.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except char symbol)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
[text (.only \n)
["%" \\format (.only format)]]
@@ -15,97 +15,86 @@
[\\library
["[0]" /]])
-(documentation: /.single_expansion
- (format "Given code that requires applying a macro, does it once and returns the result."
- \n "Otherwise, returns the code as-is.")
- [(single_expansion syntax)])
-
-(documentation: /.expansion
- (format "Given code that requires applying a macro, expands repeatedly until no more direct macro-calls are left."
- \n "Otherwise, returns the code as-is.")
- [(expansion syntax)])
+(.def .public documentation
+ (.List $.Module)
+ ($.module /._
+ ""
+ [($.documentation /.single_expansion
+ (format "Given code that requires applying a macro, does it once and returns the result."
+ \n "Otherwise, returns the code as-is.")
+ [(single_expansion syntax)])
-(documentation: /.full_expansion
- "Expands all macro-calls everywhere recursively, until only primitive/base code remains."
- [(full_expansion syntax)])
+ ($.documentation /.expansion
+ (format "Given code that requires applying a macro, expands repeatedly until no more direct macro-calls are left."
+ \n "Otherwise, returns the code as-is.")
+ [(expansion syntax)])
-(documentation: /.symbol
- (format "Generates a unique name as a Code node (ready to be used in code templates)."
- \n "A prefix can be given (or just be empty text) to better identify the code for debugging purposes.")
- [(symbol prefix)])
+ ($.documentation /.full_expansion
+ "Expands all macro-calls everywhere recursively, until only primitive/base code remains."
+ [(full_expansion syntax)])
-(documentation: /.wrong_syntax_error
- "A generic error message for macro syntax failures.")
+ ($.documentation /.symbol
+ (format "Generates a unique name as a Code node (ready to be used in code templates)."
+ \n "A prefix can be given (or just be empty text) to better identify the code for debugging purposes.")
+ [(symbol prefix)])
-(documentation: /.with_symbols
- "Creates new symbols and offers them to the body expression."
- [(def synchronized
- (syntax (_ [lock any
- body any])
- (with_symbols [g!lock g!body g!_]
- (in (list (` (let [(~ g!lock) (~ lock)
- (~ g!_) ("jvm monitorenter" (~ g!lock))
- (~ g!body) (~ body)
- (~ g!_) ("jvm monitorexit" (~ g!lock))]
- (~ g!body))))))))])
+ ($.documentation /.wrong_syntax_error
+ "A generic error message for macro syntax failures.")
-(documentation: /.one_expansion
- "Works just like expand, except that it ensures that the output is a single Code token."
- [(one_expansion token)])
+ ($.documentation /.with_symbols
+ "Creates new symbols and offers them to the body expression."
+ [(def synchronized
+ (syntax (_ [lock any
+ body any])
+ (with_symbols [g!lock g!body g!_]
+ (in (list (` (let [(~ g!lock) (~ lock)
+ (~ g!_) ("jvm monitorenter" (~ g!lock))
+ (~ g!body) (~ body)
+ (~ g!_) ("jvm monitorexit" (~ g!lock))]
+ (~ g!body))))))))])
-(documentation: /.log_single_expansion!
- (format "Performs a macro-expansion and logs the resulting code."
- \n "You can either use the resulting code, or omit them."
- \n "By omitting them, this macro produces nothing (just like the lux.comment macro).")
- [(log_single_expansion!
- (def (foo bar baz)
- (-> Int Int Int)
- (int.+ bar baz)))
- (log_single_expansion! "omit"
- (def (foo bar baz)
- (-> Int Int Int)
- (int.+ bar baz)))])
+ ($.documentation /.one_expansion
+ "Works just like expand, except that it ensures that the output is a single Code token."
+ [(one_expansion token)])
-(documentation: /.log_expansion!
- (format "Performs a macro-expansion and logs the resulting code."
- \n "You can either use the resulting code, or omit them."
- \n "By omitting them, this macro produces nothing (just like the lux.comment macro).")
- [(log_expansion!
- (def (foo bar baz)
- (-> Int Int Int)
- (int.+ bar baz)))
- (log_expansion! "omit"
- (def (foo bar baz)
- (-> Int Int Int)
- (int.+ bar baz)))])
+ ($.documentation /.log_single_expansion!
+ (format "Performs a macro-expansion and logs the resulting code."
+ \n "You can either use the resulting code, or omit them."
+ \n "By omitting them, this macro produces nothing (just like the lux.comment macro).")
+ [(log_single_expansion!
+ (def (foo bar baz)
+ (-> Int Int Int)
+ (int.+ bar baz)))
+ (log_single_expansion! "omit"
+ (def (foo bar baz)
+ (-> Int Int Int)
+ (int.+ bar baz)))])
-(documentation: /.log_full_expansion!
- (format "Performs a macro-expansion and logs the resulting code."
- \n "You can either use the resulting code, or omit them."
- \n "By omitting them, this macro produces nothing (just like the lux.comment macro).")
- [(log_full_expansion!
- (def (foo bar baz)
- (-> Int Int Int)
- (int.+ bar baz)))
- (log_full_expansion! "omit"
- (def (foo bar baz)
- (-> Int Int Int)
- (int.+ bar baz)))])
+ ($.documentation /.log_expansion!
+ (format "Performs a macro-expansion and logs the resulting code."
+ \n "You can either use the resulting code, or omit them."
+ \n "By omitting them, this macro produces nothing (just like the lux.comment macro).")
+ [(log_expansion!
+ (def (foo bar baz)
+ (-> Int Int Int)
+ (int.+ bar baz)))
+ (log_expansion! "omit"
+ (def (foo bar baz)
+ (-> Int Int Int)
+ (int.+ bar baz)))])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [..single_expansion
- ..expansion
- ..full_expansion
- ..symbol
- ..wrong_syntax_error
- ..with_symbols
- ..one_expansion
- ..log_single_expansion!
- ..log_expansion!
- ..log_full_expansion!]
+ ($.documentation /.log_full_expansion!
+ (format "Performs a macro-expansion and logs the resulting code."
+ \n "You can either use the resulting code, or omit them."
+ \n "By omitting them, this macro produces nothing (just like the lux.comment macro).")
+ [(log_full_expansion!
+ (def (foo bar baz)
+ (-> Int Int Int)
+ (int.+ bar baz)))
+ (log_full_expansion! "omit"
+ (def (foo bar baz)
+ (-> Int Int Int)
+ (int.+ bar baz)))])]
[/code.documentation
/local.documentation
/syntax.documentation
diff --git a/stdlib/source/documentation/lux/macro/code.lux b/stdlib/source/documentation/lux/macro/code.lux
index 707d7f754..df50d5049 100644
--- a/stdlib/source/documentation/lux/macro/code.lux
+++ b/stdlib/source/documentation/lux/macro/code.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except char local global)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
[text
["%" \\format (.only format)]]
@@ -10,20 +10,11 @@
[\\library
["[0]" /]])
-(documentation: /.local
- "Produces a local symbol (an symbol with no module prefix).")
-
-(documentation: /.replaced
- ""
- [(replaced original substitute ast)])
-
(.def .public documentation
(.List $.Module)
($.module /._
""
- [..local
- ..replaced
- ($.default /.bit)
+ [($.default /.bit)
($.default /.nat)
($.default /.int)
($.default /.rev)
@@ -35,5 +26,12 @@
($.default /.tuple)
($.default /.equivalence)
- ($.default /.format)]
+ ($.default /.format)
+
+ ($.documentation /.local
+ "Produces a local symbol (an symbol with no module prefix).")
+
+ ($.documentation /.replaced
+ ""
+ [(replaced original substitute ast)])]
[]))
diff --git a/stdlib/source/documentation/lux/macro/local.lux b/stdlib/source/documentation/lux/macro/local.lux
index a6256aa92..e71a685fb 100644
--- a/stdlib/source/documentation/lux/macro/local.lux
+++ b/stdlib/source/documentation/lux/macro/local.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except char)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
[text (.only \n)
["%" \\format (.only format)]]
@@ -10,19 +10,18 @@
[\\library
["[0]" /]])
-(documentation: /.push
- (format "Installs macros in the compiler-state, with the given names."
- \n "Yields code that can be placed either as expression or as declarations."
- \n "This code un-installs the macros."
- \n "NOTE: Always use this code once to clean-up..")
- [(push macros)])
-
(.def .public documentation
(.List $.Module)
($.module /._
""
- [..push
- ($.default /.unknown_module)
+ [($.default /.unknown_module)
($.default /.cannot_shadow_definition)
- ($.default /.unknown_definition)]
+ ($.default /.unknown_definition)
+
+ ($.documentation /.push
+ (format "Installs macros in the compiler-state, with the given names."
+ \n "Yields code that can be placed either as expression or as declarations."
+ \n "This code un-installs the macros."
+ \n "NOTE: Always use this code once to clean-up..")
+ [(push macros)])]
[]))
diff --git a/stdlib/source/documentation/lux/macro/syntax.lux b/stdlib/source/documentation/lux/macro/syntax.lux
index f9d795e37..fc7675a8c 100644
--- a/stdlib/source/documentation/lux/macro/syntax.lux
+++ b/stdlib/source/documentation/lux/macro/syntax.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except char)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
[text (.only \n)
["%" \\format (.only format)]]
@@ -18,30 +18,28 @@
[\\library
["[0]" /]])
-(documentation: /.syntax
- (format \n "A more advanced way to define macros than 'macro'."
- \n "The inputs to the macro can be parsed in complex ways through the use of syntax parsers."
- \n "The macro body is also (implicitly) run in the Meta monad, to save some typing."
- \n "Also, the compiler state can be accessed through a special binding.")
- [(def .public object
- (syntax (_ lux_state [.let [imports (class_imports lux_state)]
- .let [class_vars (list)]
- super (opt (super_class_decl^ imports class_vars))
- interfaces (tuple (some (super_class_decl^ imports class_vars)))
- constructor_args (constructor_args^ imports class_vars)
- methods (some (overriden_method_def^ imports))])
- (let [def_code (all text#composite "anon-class:"
- (spaced (list (super_class_decl$ (maybe.else object_super_class super))
- (with_brackets (spaced (list#each super_class_decl$ interfaces)))
- (with_brackets (spaced (list#each constructor_arg$ constructor_args)))
- (with_brackets (spaced (list#each (method_def$ id) methods))))))]
- (in (list (` ((~ (code.text def_code)))))))))])
-
(.def .public documentation
(.List $.Module)
($.module /._
""
- [..syntax]
+ [($.documentation /.syntax
+ (format \n "A more advanced way to define macros than 'macro'."
+ \n "The inputs to the macro can be parsed in complex ways through the use of syntax parsers."
+ \n "The macro body is also (implicitly) run in the Meta monad, to save some typing."
+ \n "Also, the compiler state can be accessed through a special binding.")
+ [(def .public object
+ (syntax (_ lux_state [.let [imports (class_imports lux_state)]
+ .let [class_vars (list)]
+ super (opt (super_class_decl^ imports class_vars))
+ interfaces (tuple (some (super_class_decl^ imports class_vars)))
+ constructor_args (constructor_args^ imports class_vars)
+ methods (some (overriden_method_def^ imports))])
+ (let [def_code (all text#composite "anon-class:"
+ (spaced (list (super_class_decl$ (maybe.else object_super_class super))
+ (with_brackets (spaced (list#each super_class_decl$ interfaces)))
+ (with_brackets (spaced (list#each constructor_arg$ constructor_args)))
+ (with_brackets (spaced (list#each (method_def$ id) methods))))))]
+ (in (list (` ((~ (code.text def_code)))))))))])]
[/check.documentation
/declaration.documentation
/definition.documentation
diff --git a/stdlib/source/documentation/lux/macro/syntax/check.lux b/stdlib/source/documentation/lux/macro/syntax/check.lux
index b0298cbd3..c96bf0cde 100644
--- a/stdlib/source/documentation/lux/macro/syntax/check.lux
+++ b/stdlib/source/documentation/lux/macro/syntax/check.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except char)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
[text
["%" \\format (.only format)]]
@@ -10,15 +10,14 @@
[\\library
["[0]" /]])
-(documentation: /.Check
- "A type annotation for an expression.")
-
(.def .public documentation
(.List $.Module)
($.module /._
""
- [..Check
- ($.default /.equivalence)
+ [($.default /.equivalence)
($.default /.format)
- ($.default /.parser)]
+ ($.default /.parser)
+
+ ($.documentation /.Check
+ "A type annotation for an expression.")]
[]))
diff --git a/stdlib/source/documentation/lux/macro/syntax/declaration.lux b/stdlib/source/documentation/lux/macro/syntax/declaration.lux
index 9698cc9af..fd9fe1a58 100644
--- a/stdlib/source/documentation/lux/macro/syntax/declaration.lux
+++ b/stdlib/source/documentation/lux/macro/syntax/declaration.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except char)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
[text
["%" \\format (.only format)]]
@@ -10,21 +10,19 @@
[\\library
["[0]" /]])
-(documentation: /.Declaration
- "A declaration for either a constant or a function.")
-
-(documentation: /.parser
- "A parser for declaration syntax."
- ["Such as:"
- quux
- (foo bar baz)])
-
(.def .public documentation
(.List $.Module)
($.module /._
""
- [..Declaration
- ..parser
- ($.default /.equivalence)
- ($.default /.format)]
+ [($.default /.equivalence)
+ ($.default /.format)
+
+ ($.documentation /.Declaration
+ "A declaration for either a constant or a function.")
+
+ ($.documentation /.parser
+ "A parser for declaration syntax."
+ ["Such as:"
+ quux
+ (foo bar baz)])]
[]))
diff --git a/stdlib/source/documentation/lux/macro/syntax/definition.lux b/stdlib/source/documentation/lux/macro/syntax/definition.lux
index ba2faeb9b..cf4b3225f 100644
--- a/stdlib/source/documentation/lux/macro/syntax/definition.lux
+++ b/stdlib/source/documentation/lux/macro/syntax/definition.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except Definition)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
[text
["%" \\format (.only format)]]
@@ -10,25 +10,22 @@
[\\library
["[0]" /]])
-(documentation: /.Definition
- "Syntax for a constant definition.")
-
-(documentation: /.parser
- "A reader that first macro-expands and then analyses the input Code, to ensure it is a definition."
- [(parser compiler)])
-
-(documentation: /.typed
- "Only works for typed definitions."
- [(typed compiler)])
-
(.def .public documentation
(.List $.Module)
($.module /._
""
- [..Definition
- ..parser
- ..typed
- ($.default /.equivalence)
+ [($.default /.equivalence)
($.default /.lacks_type)
- ($.default /.format)]
+ ($.default /.format)
+
+ ($.documentation /.Definition
+ "Syntax for a constant definition.")
+
+ ($.documentation /.parser
+ "A reader that first macro-expands and then analyses the input Code, to ensure it is a definition."
+ [(parser compiler)])
+
+ ($.documentation /.typed
+ "Only works for typed definitions."
+ [(typed compiler)])]
[]))
diff --git a/stdlib/source/documentation/lux/macro/syntax/export.lux b/stdlib/source/documentation/lux/macro/syntax/export.lux
index 2873623fd..6d23bc8b9 100644
--- a/stdlib/source/documentation/lux/macro/syntax/export.lux
+++ b/stdlib/source/documentation/lux/macro/syntax/export.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except char)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
[text
["%" \\format (.only format)]]
@@ -10,14 +10,13 @@
[\\library
["[0]" /]])
-(documentation: /.parser
- ""
- [(parser un_exported)])
-
(.def .public documentation
(.List $.Module)
($.module /._
"Syntax for marking a definition as an export."
- [..parser
- ($.default /.default_policy)]
+ [($.default /.default_policy)
+
+ ($.documentation /.parser
+ ""
+ [(parser un_exported)])]
[]))
diff --git a/stdlib/source/documentation/lux/macro/syntax/input.lux b/stdlib/source/documentation/lux/macro/syntax/input.lux
index 9e24666c0..77a6b7cac 100644
--- a/stdlib/source/documentation/lux/macro/syntax/input.lux
+++ b/stdlib/source/documentation/lux/macro/syntax/input.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except char)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
[text
["%" \\format (.only format)]]
@@ -10,18 +10,16 @@
[\\library
["[0]" /]])
-(documentation: /.Input
- "The common typed-argument syntax used by many macros.")
-
-(documentation: /.parser
- "Parser for the common typed-argument syntax used by many macros.")
-
(.def .public documentation
(.List $.Module)
($.module /._
""
- [..Input
- ..parser
- ($.default /.equivalence)
- ($.default /.format)]
+ [($.default /.equivalence)
+ ($.default /.format)
+
+ ($.documentation /.Input
+ "The common typed-argument syntax used by many macros.")
+
+ ($.documentation /.parser
+ "Parser for the common typed-argument syntax used by many macros.")]
[]))
diff --git a/stdlib/source/documentation/lux/macro/syntax/type/variable.lux b/stdlib/source/documentation/lux/macro/syntax/type/variable.lux
index 9c88e9856..c29df1817 100644
--- a/stdlib/source/documentation/lux/macro/syntax/type/variable.lux
+++ b/stdlib/source/documentation/lux/macro/syntax/type/variable.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except char)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
[text
["%" \\format (.only format)]]
@@ -10,18 +10,16 @@
[\\library
["[0]" /]])
-(documentation: /.Variable
- "A variable's name.")
-
-(documentation: /.parser
- "Parser for the common type variable/parameter used by many macros.")
-
(.def .public documentation
(.List $.Module)
($.module /._
""
- [..Variable
- ..parser
- ($.default /.equivalence)
- ($.default /.format)]
+ [($.default /.equivalence)
+ ($.default /.format)
+
+ ($.documentation /.Variable
+ "A variable's name.")
+
+ ($.documentation /.parser
+ "Parser for the common type variable/parameter used by many macros.")]
[]))
diff --git a/stdlib/source/documentation/lux/macro/template.lux b/stdlib/source/documentation/lux/macro/template.lux
index 3b4733cce..e75bbfbd9 100644
--- a/stdlib/source/documentation/lux/macro/template.lux
+++ b/stdlib/source/documentation/lux/macro/template.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except let symbol)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
[text (.only \n)
["%" \\format (.only format)]]
@@ -10,62 +10,56 @@
[\\library
["[0]" /]])
-(documentation: /.spliced
- ""
- [(spliced [a b c d])
- "=>"
- a
- b
- c
- d])
+(.def .public documentation
+ (.List $.Module)
+ ($.module /._
+ "Utilities commonly used while templating."
+ [($.default /.irregular_arguments)
-(documentation: /.amount
- ""
- [(amount [a b c d])
- "=>"
- 4])
+ ($.documentation /.spliced
+ ""
+ [(spliced [a b c d])
+ "=>"
+ a
+ b
+ c
+ d])
-(documentation: /.with_locals
- "Creates names for local bindings aliased by the names you choose."
- [(with_locals [my_var]
- (let [my_var 123]
- (text [my_var])))
- "=>"
- "__gensym__my_var506"])
+ ($.documentation /.amount
+ ""
+ [(amount [a b c d])
+ "=>"
+ 4])
-(documentation: /.text
- "A text literal made by concatenating pieces of code."
- [(text [#0 123 +456 +789.0 "abc" .def ..ghi])
- "=>"
- "#0123+456+789.0abcdefghi"])
+ ($.documentation /.with_locals
+ "Creates names for local bindings aliased by the names you choose."
+ [(with_locals [my_var]
+ (let [my_var 123]
+ (text [my_var])))
+ "=>"
+ "__gensym__my_var506"])
-(documentation: /.symbol
- (format "An symbol made by concatenating pieces of code."
- \n "The (optional) module part and the short part are specified independently.")
- [(symbol ["abc" .def ..ghi])
- "=>"
- abcdefghi]
- [(symbol [.def] ["abc" .def ..ghi])
- "=>"
- .abcdefghi])
+ ($.documentation /.text
+ "A text literal made by concatenating pieces of code."
+ [(text [#0 123 +456 +789.0 "abc" .def ..ghi])
+ "=>"
+ "#0123+456+789.0abcdefghi"])
-(documentation: /.let
- "Lexically-bound templates."
- [(let [(!square <root>)
- [(* <root> <root>)]]
- (def (square root)
- (-> Nat Nat)
- (!square root)))])
+ ($.documentation /.symbol
+ (format "An symbol made by concatenating pieces of code."
+ \n "The (optional) module part and the short part are specified independently.")
+ [(symbol ["abc" .def ..ghi])
+ "=>"
+ abcdefghi]
+ [(symbol [.def] ["abc" .def ..ghi])
+ "=>"
+ .abcdefghi])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- "Utilities commonly used while templating."
- [..spliced
- ..amount
- ..with_locals
- ..text
- ..symbol
- ..let
- ($.default /.irregular_arguments)]
+ ($.documentation /.let
+ "Lexically-bound templates."
+ [(let [(!square <root>)
+ [(* <root> <root>)]]
+ (def (square root)
+ (-> Nat Nat)
+ (!square root)))])]
[]))