leanprover-community / mathport

Mathport is a tool for porting Lean3 projects to Lean4
Apache License 2.0
43 stars 15 forks source link

dot-notation is often omitted #166

Open gebner opened 2 years ago

gebner commented 2 years ago

Lean 3:

/-- Matches one out of a list of characters. -/
def one_of (cs : list char) : parser char :=
decorate_errors (do c ← cs, return c.to_string) $
sat (∈ cs)

Synport:

/-- Matches one out of a list of characters. -/
def oneOf (cs : List Charₓ) : Parser Charₓ :=
  (decorateErrors do
      let c ← cs
      return c) <|
    sat (· ∈ cs)

Note that the .to_string disappears.

gebner commented 2 years ago

This seems to be a bug in the AST export.