Skip to content

Commit

Permalink
feat: Fix binder issue
Browse files Browse the repository at this point in the history
  • Loading branch information
William Sørensen committed Jun 24, 2024
1 parent 9ae743a commit 8ef357b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Qpf/Macro/Data.lean
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,8 @@ open Macro Comp in
def elabData : CommandElab := fun stx => do
let modifiers ← elabModifiers stx[0]
let decl := stx[1]
let view ← dataSyntaxToView modifiers decl
/- Transforms binders into simple lambda types. -/
let view ← dataSyntaxToView modifiers decl >>= preProcessCtors

let (nonRecView, ⟨r, shape, _P, eff⟩) ← runTermElabM fun _ => do
let (nonRecView, _rho) ← makeNonRecursive view;
Expand Down
14 changes: 11 additions & 3 deletions Test/WithBindersInCtor.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import Qpf
import Qpf.Macro.Data

data QpfListWithBinder α
data QpfListWithBinder α
| cons (h : α) (tl : QpfListWithBinder α)
| nil
| cons (hd : α) (tl : QpfListWithBinder α)

data Wrap α
| mk : α → Wrap α
data Wrap₂ α
| mk (a : α) : Wrap₂ α
data Wrap₃ α
| mk (a : α)

0 comments on commit 8ef357b

Please sign in to comment.