diff options
Diffstat (limited to 'stdlib/source/documentation/lux/macro/template.lux')
-rw-r--r-- | stdlib/source/documentation/lux/macro/template.lux | 100 |
1 files changed, 47 insertions, 53 deletions
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)))])] [])) |