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

Can we drop the mandatory type annotations on Optional and List? #73

Closed
ocharles opened this Issue Jan 18, 2018 · 6 comments

Comments

Projects
None yet
4 participants
@ocharles
Copy link
Contributor

ocharles commented Jan 18, 2018

Title says it all, these feel like a bit of a wart in what is otherwise a lovely format to work in.

@Gabriel439

This comment has been minimized.

Copy link
Contributor

Gabriel439 commented Jan 18, 2018

Note that type annotations are not required on non-empty lists

I'm reasonably sure they will be required on empty lists and optionals for the foreseeable future. However, Optional could be reworked to possibly omit them on non-empty Optional values

@ocharles

This comment has been minimized.

Copy link
Contributor Author

ocharles commented Feb 5, 2018

I see now that this is really to drive the typing judgement because you don't do inference. One question is to first ask if that's set in stone, or would we be open to adding some type inference?

@felix91gr

This comment has been minimized.

Copy link

felix91gr commented Feb 5, 2018

@Gabriel439

This comment has been minimized.

Copy link
Contributor

Gabriel439 commented Feb 7, 2018

For me the main constraint is how difficult it is to standardize any type-checking algorithm that uses type inference. I'm not ruling it out but I'd like to see additional backends for Dhall before making large changes to the semantics

@f-f

This comment has been minimized.

Copy link
Member

f-f commented Oct 29, 2018

@ocharles since #227 Optionals containing a value don't need a type annotation, and I'd say this is the most we can do for now. So we can probably close this?

@ocharles

This comment has been minimized.

Copy link
Contributor Author

ocharles commented Oct 29, 2018

I'd be OK with that. I still think ultimately the lack of type inference is something we'll need to address, but this issue isn't the place for it. Closing!

@ocharles ocharles closed this Oct 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.