Skip to content

REPL let bindings can't define infix operators #759

@brianhuffman

Description

@brianhuffman

I can define named values or functions at the REPL with let, but I can't define infix operators:

Cryptol> let f x y = x && y
Cryptol> let x & y = x && y

Parse error at <interactive>:1:7,
  unexpected: &
Cryptol> let (&) = (&&)

Parse error at <interactive>:1:6,
  unexpected: &
Cryptol> let (&) x y = x && y

Parse error at <interactive>:1:6,
  unexpected: &

I would expect all of those forms to work.

Metadata

Metadata

Assignees

Labels

UXIssues related to the user experience (e.g., improved error messages)command-line-replRelated to Cryptol's text-based UIparserIssues with lexing or parsing.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions