mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2025-12-05 22:48:43 +00:00
type structure change, part done
This commit is contained in:
parent
78c696b99a
commit
522dd16f79
13 changed files with 386 additions and 218 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue