From f92c806ee8da63f04bbefbf558f6249bacdb47ea Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 15 Jun 2022 23:13:48 -0400 Subject: Better syntax for the "sharing" and "by_example" macros. --- stdlib/source/documentation/lux/type.lux | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'stdlib/source/documentation') 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))]) -- cgit v1.2.3