1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-02 10:47:32 +03:00
juvix/tests/negative/UnexpectedArgumentNew.juvix
Łukasz Czajka 5948a38a54
Named arguments syntax with function definitions (#2494)
* Closes #2365
* Implements the syntax `f@{x1 := def1; ...; xn := defn}` and `f@?{x1 :=
def1; ..; xn := defn}`. Each definition inside the `@{..}` is an
ordinary function definition. The `@?` version allows partial
application (not all explicit named arguments need to be provided). This
subsumes the old record creation syntax.
2023-11-07 12:02:22 +01:00

8 lines
91 B
Plaintext

module UnexpectedArgumentNew;
type T := t : T;
f (a : T) : T := t;
x : T := f@{x := t};