From e814f667aed509a70bd386dcd54628929134def4 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 26 Aug 2021 02:34:05 -0400 Subject: "Interface" instead of "interface:", and "Rec" can be used in type definition. --- stdlib/source/documentation/lux.lux | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'stdlib/source/documentation/lux.lux') diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux index a046d1fdc..b1d7ae466 100644 --- a/stdlib/source/documentation/lux.lux +++ b/stdlib/source/documentation/lux.lux @@ -322,7 +322,22 @@ ["A name has to be given to the whole type, to use it within its body." (Rec Int_List (Or Any - [Int Int_List]))]) + [Int Int_List]))] + ["Can also be used with type: and labelled-type definitions." + (type: Type + (Rec @ + (Variant + (#Primitive Text (List @)) + (#Sum @ @) + (#Product @ @) + (#Function @ @) + (#Parameter Nat) + (#Var Nat) + (#Ex Nat) + (#UnivQ (List @) @) + (#ExQ (List @) @) + (#Apply @ @) + (#Named Name @))))]) (documentation: /.exec "Sequential execution of expressions (great for side-effects)." @@ -491,13 +506,14 @@ #End (#Item a (List a)))]) -(documentation: /.interface: +(documentation: /.Interface "Interface definition." - [(interface: .public (Order a) - (: (Equivalence a) - &equivalence) - (: (-> a a Bit) - <))]) + [(type: .public (Order a) + (Interface + (: (Equivalence a) + &equivalence) + (: (-> a a Bit) + <)))]) (.template [] [(documentation: @@ -962,7 +978,7 @@ ..Variant ..Record ..type: - ..interface: + ..Interface ..i64 ..nat ..int -- cgit v1.2.3