From 6fd22846f21b8b70b7867e989109d14a366c0a3e Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 14 Aug 2021 03:09:58 -0400 Subject: Moved documentation-generation machinery to its own module. --- stdlib/source/documentation/lux.lux | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 stdlib/source/documentation/lux.lux (limited to 'stdlib/source/documentation/lux.lux') diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux new file mode 100644 index 000000000..5131a9607 --- /dev/null +++ b/stdlib/source/documentation/lux.lux @@ -0,0 +1,31 @@ +(.module: + [library + [lux + [program (#+ program:)] + ["$" documentation (#+ documentation:)] + ["." debug] + [control + ["." io]]]] + [\\library + ["." /]] + ["." / #_ + ["#." abstract]]) + +(documentation: /.:of + "Generates the type corresponding to a given expression." + [(let [my_num +123] + (:of my_num)) + "=>" + .Int] + [(:of +123) + "=>" + .Int]) + +(.def: .public documentation + (.List $.Module) + ($.module /._ + [..:of] + [/abstract.documentation])) + +(program: inputs + (io.io (debug.log! ($.documentation ..documentation)))) -- cgit v1.2.3