Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax: Function arguments #45

Merged
merged 10 commits into from
Mar 8, 2024
Merged

Syntax: Function arguments #45

merged 10 commits into from
Mar 8, 2024

Conversation

eduardo-imadeira
Copy link
Collaborator

@eduardo-imadeira eduardo-imadeira commented Mar 8, 2024

closes #43

  • Change the parser to accept multiple sets or arguments in parenthesis (trivial)
  • Automatically translate (x:Int | p) : Int to (x:{x:Int | p }) -> Int = \x ->
  • Change the type grammar rule to accept (x:Int | p) instead of {x : Int | p}
  • Add support to also accept (x:Int) instead of {x : Int | p}

about the last 2 checkboxes, I didnt remove the support to the old syntax, now supports both syntaxes, as we can see in the file 'aeon/examples/sugar/function_main.ae':

def fff : (z:Int) -> (f: (a:{k:Int | 1 <= k && k <= 10000}) ->( b:{m:Int | 0 <=m} ) -> Int ) -> Int = \b-> \a-> b+ a(2)(3);
def fff : (z:Int) -> (f: (a:Int | 1 <= a && a <= 10000) -> ( b:Int | 0 <=b) -> Int ) -> Int = \b-> \a-> b+ a(2)(3);

@eduardo-imadeira eduardo-imadeira linked an issue Mar 8, 2024 that may be closed by this pull request
4 tasks
@alcides alcides merged commit 91023dc into master Mar 8, 2024
5 checks passed
@alcides alcides deleted the function_args branch April 3, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Syntax: Function arguments
2 participants