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

Panic when evaluating literal type. #1142

Closed
linesthatinterlace opened this issue Mar 31, 2021 · 5 comments
Closed

Panic when evaluating literal type. #1142

linesthatinterlace opened this issue Mar 31, 2021 · 5 comments
Labels
duplicate Essentially the same as another issue

Comments

@linesthatinterlace
Copy link

linesthatinterlace commented Mar 31, 2021

Cryptol asked me to raise this bug: as you can see, I simply input `{0 - 1} at the REPL, and it asked me to submit a bug.

cryptol> `{0 -1}
cryptol: You have encountered a bug in Cryptol's implementation.
*** Please create an issue at https://github.com/GaloisInc/cryptol/issues

%< --------------------------------------------------- 
  Revision:  a506732dc63cf5bd78f18ac7ac525926c805a2b6
  Branch:    HEAD (uncommited files present)
  Location:  doCheckType
  Message:   TTyApp found when kind checking, but it should have been eliminated already
CallStack (from HasCallStack):
  panic, called at src/Cryptol/Utils/Panic.hs:21:9 in cryptol-2.10.0.99-inplace:Cryptol.Utils.Panic
  panic, called at src/Cryptol/TypeCheck/Kind.hs:391:24 in cryptol-2.10.0.99-inplace:Cryptol.TypeCheck.Kind
%< --------------------------------------------------- 
@linesthatinterlace linesthatinterlace changed the title Bug when evaluating a partial type function. Crash when evaluating a partial type function. Mar 31, 2021
@linesthatinterlace linesthatinterlace changed the title Crash when evaluating a partial type function. Panic when evaluating a partial type function. Mar 31, 2021
@linesthatinterlace linesthatinterlace changed the title Panic when evaluating a partial type function. Panic when evaluating literal type. Mar 31, 2021
@linesthatinterlace
Copy link
Author

Actually, it's not actually the - that is causing it, I was wrong, it's the use of the curly braces (should be parentheses). Not sure why it crashes!

@yav
Copy link
Member

yav commented Mar 31, 2021

The correct notation is to use parens instead of braces, and we had a bug in the parser, which has now been fixed (should be in the release from a few days ago).

Cryptol> `{0-1}

[error] at <interactive>:1:2--1:7:
  Unexpected bare type application.
  Perhaps you meant `( ... ) instead.

@robdockins
Copy link
Contributor

Yup, same as #962

@robdockins robdockins added the duplicate Essentially the same as another issue label Mar 31, 2021
@linesthatinterlace
Copy link
Author

linesthatinterlace commented Mar 31, 2021 via email

@robdockins
Copy link
Contributor

No worries! It's interesting that we've had this bug for a long time, I think, but somehow 4 different people noticed it just in the last few months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Essentially the same as another issue
Projects
None yet
Development

No branches or pull requests

3 participants