aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-08-14 03:09:58 -0400
committerEduardo Julian2021-08-14 03:09:58 -0400
commit6fd22846f21b8b70b7867e989109d14a366c0a3e (patch)
tree9086774968ad944133dc5cf29c546add6e13a4b6 /stdlib/source/documentation/lux.lux
parente53c1a090eb9cfac3cb23d10d981648d02518ed1 (diff)
Moved documentation-generation machinery to its own module.
Diffstat (limited to 'stdlib/source/documentation/lux.lux')
-rw-r--r--stdlib/source/documentation/lux.lux31
1 files changed, 31 insertions, 0 deletions
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))))