type structure change, part done

This commit is contained in:
ProgramSnail 2023-08-08 10:30:16 +03:00
parent 78c696b99a
commit 522dd16f79
13 changed files with 386 additions and 218 deletions

View file

@ -1,3 +1,4 @@
#!/usr/bin/env lang
:: module; // import module to current namespace
@ -221,3 +222,9 @@ parse_number : Unit! = {
: function, that return result ('!' not used on calls)
: useful when tuples returned
result_func! 'a 'b -> 'c -> 'd = ?? 'a == 0 => error "some error" !!=> ('c := 'a, 'd := 'b, ());
// (A & B & C) same to Tuple[A B C]
tuple_argument_test 'x : (A & B & C) = do_something;
// ((A1 & A2) | B | C) same to Variant[Tuple[A1 A2] B C]
variant_argument_test 'x : ((A1 & A2) | B | C) = do_something;