Skip to content

Add command line option to treat batch files as individual lines in interactive mode #1006

@benjaminselfridge

Description

@benjaminselfridge

This would add an additional flag for the -b FILE batch mode for cryptol, which would have the effect of reverting to the old behavior. That behavior includes both:

  • using <interactive> as the file name in error messages
  • not tracking line numbers in error messages (so any error is reported as occurring on "line 1", regardless of where it appeared in the file)

The reason I need this is to keep the error messages in Programming Cryptol consistent with what the actual error message output would be.

As an example, suppose we have a file in.cry containing the following:

  True
  false
  False : Bit
  if True && False then 0x3 else 0x4
  False || True
  (True && False) ^ True
  ~False
  ~(False || True)

When I run cryptol -b in.cry, I get the following output:

True
[error] at in.icry:2:1--2:6 Value not in scope: false
False
0x4
True
True
True
False

I'd like this flag to have the effect of changing the above output to:

True
[error] at <interactive>:1:1--1:6 Value not in scope: false
False
0x4
True
True
True
False

Metadata

Metadata

Assignees

Labels

feature requestAsking for new or improved functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions