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

[BUG] Incomprehensible parse error in type annotations #832

Open
konnov opened this issue May 18, 2021 · 1 comment
Open

[BUG] Incomprehensible parse error in type annotations #832

konnov opened this issue May 18, 2021 · 1 comment
Labels
bug FTC-Snowcat Feature: Fully-functional type checker Snowcat product-owner-triage This should be triaged by the product owner usability UX improvements

Comments

@konnov
Copy link
Collaborator

konnov commented May 18, 2021

I've forgotten that we have to use the tuple syntax:

\* @type: () => (Bool, Bool);
View1 ==
  <<x < 0, x > 0>>

The type parser spitted out something incomprehensible:

scala.MatchError: (List(Bool, Bool)~None) (of class scala.util.parsing.combinator.Parsers$$tilde)
	at at.forsyte.apalache.io.typecheck.parser.DefaultType1Parser$.$anonfun$typeExpr$5(DefaultType1Parser.scala:68)
@konnov konnov added the bug label May 18, 2021
@konnov konnov added this to the May iteration milestone May 18, 2021
@konnov konnov added FTC-Snowcat Feature: Fully-functional type checker Snowcat usability UX improvements labels May 18, 2021
shonfeder pushed a commit that referenced this issue Jul 20, 2021
This does not "fix" #832, insofar as that reports an incomprehensible
error message. The current message is still not very comprehensible, but
it is better than a MatchError at least.

A proper fix will require reworking the parser a bit to allow giving
more intelligent feedback.
shonfeder pushed a commit that referenced this issue Jul 21, 2021
This does not "fix" #832, insofar as that reports an incomprehensible
error message. The current message is still not very comprehensible, but
it is better than a MatchError at least.

A proper fix will require reworking the parser a bit to allow giving
more intelligent feedback.
shonfeder pushed a commit that referenced this issue Jul 21, 2021
This does not "fix" #832, insofar as that reports an incomprehensible
error message. The current message is still not very comprehensible, but
it is better than a MatchError at least.

A proper fix will require reworking the parser a bit to allow giving
more intelligent feedback.
shonfeder pushed a commit that referenced this issue Jul 26, 2021
This does not "fix" #832, insofar as that reports an incomprehensible
error message. The current message is still not very comprehensible, but
it is better than a MatchError at least.

A proper fix will require reworking the parser a bit to allow giving
more intelligent feedback.
@shonfeder shonfeder added this to the Erorr Message Overhaul milestone Dec 13, 2021
@konnov konnov added the product-owner-triage This should be triaged by the product owner label Jul 13, 2022
@shonfeder shonfeder removed this from the Typechecker Snowcat milestone Jan 18, 2023
@Kukovec
Copy link
Collaborator

Kukovec commented Mar 14, 2023

I just ran this today, and the error message reads:

Parsing error in the type annotation: () => (Bool, Bool)
Typing input error: Parser error in type annotation of View1: '->' expected but ) found

@konnov do you still consider this incomprehensible? It doesn't outright say that you should use <<...>> in the type, but it's also not a scala exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug FTC-Snowcat Feature: Fully-functional type checker Snowcat product-owner-triage This should be triaged by the product owner usability UX improvements
Projects
None yet
Development

No branches or pull requests

3 participants