diff options
Diffstat (limited to 'stdlib/source/documentation/lux/meta/static.lux')
-rw-r--r-- | stdlib/source/documentation/lux/meta/static.lux | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/stdlib/source/documentation/lux/meta/static.lux b/stdlib/source/documentation/lux/meta/static.lux new file mode 100644 index 000000000..9ae73aae8 --- /dev/null +++ b/stdlib/source/documentation/lux/meta/static.lux @@ -0,0 +1,56 @@ +(.require + [library + [lux (.except nat int rev) + ["$" documentation] + [data + [text + ["%" \\format (.only format)]] + [collection + ["[0]" list]]]]] + [\\library + ["[0]" /]]) + +(`` (.def .public documentation + (.List $.Module) + ($.module /._ + "" + [(,, (with_template [<name> <type>] + [($.documentation <name> + (%.code (' (<name> + (is <type> + (value generating expression))))))] + + [/.nat .Nat] + [/.int .Int] + [/.rev .Rev] + [/.frac .Frac] + [/.text .Text] + )) + + ($.documentation /.literal + "" + [(/.literal + (is (-> ??? Code) + format) + (is ??? + (value generating expression)))]) + + (,, (with_template [<name> <type>] + [($.documentation <name> + (%.code (' (is <type> + (<name>)))))] + + [/.random_nat .Nat] + [/.random_int .Int] + [/.random_rev .Rev] + [/.random_frac .Frac] + )) + + ($.documentation /.random + "" + [(/.random + (is (-> ??? Code) + format) + (is (Random ???) + (random data generator)))])] + []))) |