aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation
diff options
context:
space:
mode:
authorEduardo Julian2022-06-15 23:13:48 -0400
committerEduardo Julian2022-06-15 23:13:48 -0400
commitf92c806ee8da63f04bbefbf558f6249bacdb47ea (patch)
treef0ff0c93cfcf68bded11c9676b65232f30032628 /stdlib/source/documentation
parent24986506e8beb5074f6aca048506389e90e196bd (diff)
Better syntax for the "sharing" and "by_example" macros.
Diffstat (limited to 'stdlib/source/documentation')
-rw-r--r--stdlib/source/documentation/lux/type.lux20
1 files changed, 9 insertions, 11 deletions
diff --git a/stdlib/source/documentation/lux/type.lux b/stdlib/source/documentation/lux/type.lux
index 0d7a4da40..3c913198a 100644
--- a/stdlib/source/documentation/lux/type.lux
+++ b/stdlib/source/documentation/lux/type.lux
@@ -131,22 +131,20 @@
"Allows specifing the type of an expression as sharing type-variables with the type of another expression."
[(is (Bar Bit Nat Text)
(sharing [a b c]
- (Foo a [b c])
- (is (Foo Bit [Nat Text])
- (foo expression))
-
- (Bar a b c)
- (bar expression)))])
+ (is (Foo a [b c])
+ (is (Foo Bit [Nat Text])
+ (foo expression)))
+ (is (Bar a b c)
+ (bar expression))))])
(documentation: /.by_example
"Constructs a type that shares type-variables with an expression of some other type."
[(is Type
(by_example [a b c]
- (Foo a [b c])
- (is (Foo Bit [Nat Text])
- (foo expression))
-
- (Bar a b c)))
+ (is (Foo a [b c])
+ (is (Foo Bit [Nat Text])
+ (foo expression)))
+ (Bar a b c)))
"=>"
(.type (Bar Bit Nat Text))])