fix: spacing around calc
This commit is contained in:
parent
28538fc748
commit
e826f5f42a
3 changed files with 8 additions and 1 deletions
|
|
@ -92,7 +92,7 @@ end
|
|||
syntax calcFirstStep := ppIndent(colGe term (" := " term)?)
|
||||
-- enforce indentation of calc steps so we know when to stop parsing them
|
||||
syntax calcStep := ppIndent(colGe term " := " term)
|
||||
syntax calcSteps := ppLine withPosition(calcFirstStep) ppLine withPosition((calcStep ppLine)*)
|
||||
syntax calcSteps := ppLine withPosition(calcFirstStep) withPosition((ppLine calcStep)*)
|
||||
|
||||
/-- Step-wise reasoning over transitive relations.
|
||||
```
|
||||
|
|
|
|||
|
|
@ -59,3 +59,7 @@ def foo : a b c d e f g a b c d e f g h where
|
|||
i := 42
|
||||
j := 42
|
||||
k := 42)
|
||||
|
||||
#eval fmt `(calc
|
||||
1 = 1 := rfl
|
||||
1 = 1 := rfl)
|
||||
|
|
|
|||
|
|
@ -67,3 +67,6 @@ def foo✝ : a✝ b✝ c✝ d✝ e✝ f✝ g✝ a✝ b✝ c✝ d✝ e✝ f✝ g
|
|||
i✝ := 42
|
||||
j✝ := 42
|
||||
k✝ := 42
|
||||
calc
|
||||
1 = 1 := rfl✝
|
||||
1 = 1 := rfl✝
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue