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

add declare-and-bind back to Substance syntax #457

Closed
kai-qu opened this issue Feb 2, 2021 · 2 comments
Closed

add declare-and-bind back to Substance syntax #457

kai-qu opened this issue Feb 2, 2021 · 2 comments

Comments

@kai-qu
Copy link
Contributor

kai-qu commented Feb 2, 2021

Is your feature request related to a problem? Please describe.
Having the ability to write T x := e instead of T x \n x := e would make life a lot easier for reading and writing Substance. (see e.g. pythagorean-theorem-sugared.sub). Also, as currently implemented in Haskell, I believe it is done specially in a parse stage, and is not even part of the syntactic sugar mechanism (since it should be available to all domains). Shouldn't be too much work.

I would like this to be available to users in the upcoming web port since we don't have a clear timeline for the syntactic sugar.

Describe the solution you'd like
As above

Describe alternatives you've considered
None

(Unless this is already implemented and is a bug? When I try to use it, the parser says

Unhandled Rejection (Error): Syntax error at line 3 col 14:

  Triangle ABC :=
               ^
Unexpected def token: ":=". Instead, I was expecting to see one of the following:

Can give more info if needed)

@wodeni
Copy link
Member

wodeni commented Feb 2, 2021

Just added decl_bind to the parser in c6760e0. Closing now.

@wodeni wodeni closed this as completed Feb 2, 2021
@kai-qu
Copy link
Contributor Author

kai-qu commented Feb 2, 2021

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants