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

Incorrect parse on this term #108

Open
VictorTaelin opened this issue Jun 19, 2020 · 2 comments
Open

Incorrect parse on this term #108

VictorTaelin opened this issue Jun 19, 2020 · 2 comments

Comments

@VictorTaelin
Copy link
Contributor

Seems like it parses ?a as part of the type, investigate

T Decision<A: Type>
| Decision.yep(proof: A);
| Decision.nop(proof: Not(A));

Decision.get<A: Type>(dec: Decision(A)): case dec: | A; | Not(A);
  ?a
@johnchandlerburnham
Copy link
Contributor

I this this is happening because parse_cse can take an optional motive. This line: https://github.com/moonad/Formality/blob/1223d71682af9aa60834fcfc282203240e559d3b/javascript/FormalityLang.js#L611 So it reads ?a as the motive instead of the body of the expression.

I'm already working on another issue with parse_cse (as reported bye @emturner on the telegram channel) with parsing extra | branches with parse_bar, so I can work on a solution here too.

@emturner
Copy link
Contributor

emturner commented Jun 19, 2020

does sound similar;

@MaiaVictor asked me to raise an issue for it - it's over at #89 on the Formality repo

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

No branches or pull requests

3 participants