aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/debug.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/documentation/lux/debug.lux115
1 files changed, 58 insertions, 57 deletions
diff --git a/stdlib/source/documentation/lux/debug.lux b/stdlib/source/documentation/lux/debug.lux
index 480af7a9e..b32c68fc7 100644
--- a/stdlib/source/documentation/lux/debug.lux
+++ b/stdlib/source/documentation/lux/debug.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except private)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -8,65 +8,66 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.cannot_represent_value)
- ($.definition /.type_hole)
- ($.definition /.unknown_local_binding)
+(def .public documentation
+ (.List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.inspection
- "A best-effort attempt to generate a textual representation of a value, without knowing its type."
- [(inspection value)])
+ ($.definition /.cannot_represent_value)
+ ($.definition /.type_hole)
+ ($.definition /.unknown_local_binding)
- ($.definition /.representation
- "A best-effort attempt to generate a textual representation of a value, while knowing its type."
- [(representation type value)])
+ ($.definition /.inspection
+ "A best-effort attempt to generate a textual representation of a value, without knowing its type."
+ [(inspection value)])
- ($.definition /.private
- "Allows access to un-exported definitions in other modules."
- ["Module A"
- (def .private (secret_definition input)
- (-> ??? ???)
- (foo (bar (baz input))))
- "Module B"
- ((/.private secret_definition) my_input)])
+ ($.definition /.representation
+ "A best-effort attempt to generate a textual representation of a value, while knowing its type."
+ [(representation type value)])
- ($.definition /.log!
- "Prints/writes a message to standard output."
- [(log! message)])
+ ($.definition /.private
+ "Allows access to un-exported definitions in other modules."
+ ["Module A"
+ (def .private (secret_definition input)
+ (-> ??? ???)
+ (foo (bar (baz input))))
+ "Module B"
+ ((/.private secret_definition) my_input)])
- ($.definition /.hole
- (format "A typed 'hole'."
- \n "Reveals the type expected of the expression that should go in the hole.")
- [(is (-> Nat Text)
- (function (_ number)
- (hole)))
- "=>"
- .Text])
+ ($.definition /.log!
+ "Prints/writes a message to standard output."
+ [(log! message)])
- ($.definition /.here
- "Shows the names and values of local bindings available around the call to 'here'."
- [(let [foo 123
- bar +456
- baz +789.0]
- (is Any
- (here)))
- "=>"
- "foo: +123"
- "bar: +456"
- "baz: +789.0"
- []]
- ["Can optionally be given a list of definitions to focus on."
- "These definitions to focus on can include custom format to represent the values."
- (let [foo 123
- bar +456
- baz +789.0]
- (is Any
- (here [foo %.nat] baz)))
- "=>"
- "foo: 123"
- "baz: +789.0"
- []])]
- []))
+ ($.definition /.hole
+ (format "A typed 'hole'."
+ \n "Reveals the type expected of the expression that should go in the hole.")
+ [(is (-> Nat Text)
+ (function (_ number)
+ (hole)))
+ "=>"
+ .Text])
+
+ ($.definition /.here
+ "Shows the names and values of local bindings available around the call to 'here'."
+ [(let [foo 123
+ bar +456
+ baz +789.0]
+ (is Any
+ (here)))
+ "=>"
+ "foo: +123"
+ "bar: +456"
+ "baz: +789.0"
+ []]
+ ["Can optionally be given a list of definitions to focus on."
+ "These definitions to focus on can include custom format to represent the values."
+ (let [foo 123
+ bar +456
+ baz +789.0]
+ (is Any
+ (here [foo %.nat] baz)))
+ "=>"
+ "foo: 123"
+ "baz: +789.0"
+ []])
+ ))