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

Unrecognised constructor in a pattern results in an exception #1395

Closed
lukaszcz opened this issue Jul 19, 2022 · 0 comments · Fixed by #1400
Closed

Unrecognised constructor in a pattern results in an exception #1395

lukaszcz opened this issue Jul 19, 2022 · 0 comments · Fixed by #1400

Comments

@lukaszcz
Copy link
Collaborator

Compiling:

module braces;

inductive Unit {
  unit : Unit;
};

f : Unit -> Unit;
f (WTF x) := x;

end;

results is:

juvix: constructor expected on the left of a pattern application
CallStack (from HasCallStack):
  error, called at src/Juvix/Prelude/Base.hs:264:9 in juvix-0.2.1-CZT06Rzh5GNEZIQRWHpfSc:Juvix.Prelude.Base
  error, called at src/Juvix/Translation/ScopedToAbstract.hs:382:11 in juvix-0.2.1-CZT06Rzh5GNEZIQRWHpfSc:Juvix.Translation.ScopedToAbstract

This should be a user-level error message without a stack trace.

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