Skip to content

Commit 7c59e3e

Browse files
committed
test(Syntax): add regression test for well-formed notation collision
1 parent bb4d6c1 commit 7c59e3e

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

CslibTests.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ import CslibTests.LTS
1111
import CslibTests.LambdaCalculus
1212
import CslibTests.MLL
1313
import CslibTests.Reduction
14+
import CslibTests.HasWellFormed

CslibTests/HasWellFormed.lean

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/-
2+
Copyright (c) 2026 Sean D. Stoneburner. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Sean D. Stoneburner
5+
-/
6+
import Cslib.Algorithms.Lean.TimeM
7+
import Cslib.Foundations.Syntax.HasWellFormed
8+
9+
open Cslib.Algorithms.Lean
10+
11+
/-!
12+
# Syntax Collision Test
13+
This file tests that the `✓` prefix macro from `TimeM` does not collide with
14+
the `✓` postfix notation from `HasWellFormed` across line breaks.
15+
-/
16+
17+
def testParserCollision (n : Nat) : TimeM Nat Nat := do
18+
let m := n
19+
return m
20+
21+
-- Ensure the postfix notation still functions correctly when attached without whitespace
22+
variable {α : Type*} [Cslib.HasWellFormed α] (x : α)
23+
#check x✓

0 commit comments

Comments
 (0)