Skip to content

Commit

Permalink
deriving test cases
Browse files Browse the repository at this point in the history
The final test case currently fails, exposing a bug when auto implicits are disabled
  • Loading branch information
alexkeizer committed Dec 11, 2024
1 parent 39e065a commit 182775a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/lean/run/derivingToExpr.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Lean.Elab.Deriving.ToExpr

open Lean (ToExpr)

-- Test with a universe polymporphic type parameter
inductive Option' (α : Type u)
| some (a : α)
| none
deriving ToExpr

-- Test with recursive type
inductive List' (α : Type u)
| cons (a : α) (as : List' α)
| nil
deriving ToExpr

-- Test without (universe) auto implicit
set_option autoImplicit false in
inductive ExplicitList'.{u} (α : Type u)
| cons (a : α) (as : List' α)
| nil
deriving ToExpr

0 comments on commit 182775a

Please sign in to comment.