Skip to content

Reference interpreter panics on let-bound values #1133

@robdockins

Description

@robdockins
Cryptol> let x = zero:[8]
Cryptol> x@0
False
Cryptol> :eval x@0
cryptol: You have encountered a bug in Cryptol's implementation.
*** Please create an issue at https://github.com/GaloisInc/cryptol/issues

%< ---------------------------------------------------
  Revision:  8ed946ea75646f732e46c6917dd4e95a4d4e964e
  Branch:    master (uncommited files present)
  Location:  [Reference Evaluator]evalExpr
  Message:   var `<interactive>::x` is not defined
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/Eval/Reference.lhs:1689:19 in cryptol-2.10.0.99-inplace:Cryptol.Eval.Reference
%< ---------------------------------------------------

I think it's probably fine to not support REPL let bindings for :eval, but we shouldn't panic.

Metadata

Metadata

Assignees

Labels

bugSomething not working correctly

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions