Skip to content

Commit

Permalink
feat: add PEmpty
Browse files Browse the repository at this point in the history
closes #537
  • Loading branch information
leodemoura committed Aug 7, 2021
1 parent 6e2b718 commit 8a84532
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/Init/Prelude.lean
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ inductive False : Prop

inductive Empty : Type

set_option bootstrap.inductiveCheckResultingUniverse false in
inductive PEmpty : Sort u where

def Not (a : Prop) : Prop := a → False

@[macroInline] def False.elim {C : Sort u} (h : False) : C :=
Expand Down
4 changes: 0 additions & 4 deletions tests/lean/276.lean
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
universe u v

-- `Type u` version can be defined without this option, but I get the same error
set_option bootstrap.inductiveCheckResultingUniverse false in
inductive PEmpty : Sort u

-- `#check` works
set_option pp.all true in
#check fun {α : Sort v} => PEmpty.rec (fun _ => α)
Expand Down
2 changes: 1 addition & 1 deletion tests/lean/276.lean.expected.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
fun {α : Sort v} => PEmpty.rec.{v, u_1} fun (x : PEmpty.{u_1}) => α : {α : Sort v} → PEmpty.{u_1} → α
276.lean:13:4-13:15: error: code generator does not support recursor 'PEmpty.rec' yet, consider using 'match ... with' and/or structural recursion
276.lean:9:4-9:15: error: code generator does not support recursor 'PEmpty.rec' yet, consider using 'match ... with' and/or structural recursion

0 comments on commit 8a84532

Please sign in to comment.