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

Allow tuple destruction in anonymous function #296

Closed
n-osborne opened this issue Jul 7, 2023 · 1 comment · Fixed by #309
Closed

Allow tuple destruction in anonymous function #296

n-osborne opened this issue Jul 7, 2023 · 1 comment · Fixed by #309
Milestone

Comments

@n-osborne
Copy link
Contributor

No description provided.

@n-osborne n-osborne added this to the 0.2.0 milestone Jul 7, 2023
@shym
Copy link
Contributor

shym commented Jul 10, 2023

A reasonable implementation would probably use patterns there, as we would want to allow also nested tuples, etc.
But patterns do not parse casts at the moment it seems (and they would be required for function arguments):

val f : int option -> int
(*@ r = f x
    requires match x with
             | Some (y:int) -> y >= 0
             | None -> true *)

(* {gospel_expected|
   [125] gospel: internal error, uncaught exception:
                 File "src/dterm.ml", line 332, characters 18-24: Assertion failed
                 
   |gospel_expected} *)

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 a pull request may close this issue.

2 participants