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

Typing for variables in let expressions #1637

Closed
jonaprieto opened this issue Nov 22, 2022 · 2 comments · Fixed by #1785
Closed

Typing for variables in let expressions #1637

jonaprieto opened this issue Nov 22, 2022 · 2 comments · Fixed by #1785

Comments

@jonaprieto
Copy link
Collaborator

jonaprieto commented Nov 22, 2022

Instead of:

let { x : A;
      x := y } in z;

We want to type:

let x : A := y in z;
@lukaszcz
Copy link
Collaborator

lukaszcz commented Jan 13, 2023

With the shorter syntax we should allow omitting the braces. Otherwise it gets unnecessarily verbose, in my opinion.

jonaprieto added a commit that referenced this issue Jan 19, 2023
* Closes #1597 
* Closes #1624 
* Closes #1633 

The tutorial uses syntax which has not been implemented yet: it depends
on
- #1637, 
- #1716, 
- #1639,
- #1638.

The tutorial also assumes the following issues are done: 
- #1720, and
- #1701.

Co-authored-by: Jonathan Cubides <jonathan.cubides@uib.no>
@janmasrovira janmasrovira linked a pull request Jan 30, 2023 that will close this issue
@janmasrovira
Copy link
Collaborator

janmasrovira commented Jan 30, 2023

@lukaszcz I agree. Moreover, since the braces for let expressions serve no purpose, I think we should get rid of them entirely. See #1786

paulcadman pushed a commit that referenced this issue Jan 31, 2023
- Closes #1637.

A function type signature is now allowed to have a body. This is valid
for both top level and let definitions.
```
not : Bool -> Bool := λ {
 | true := false
 | false := true
};
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants