Skip to content

Commit

Permalink
add Hashable instances for PUnit and PEmpty
Browse files Browse the repository at this point in the history
  • Loading branch information
javra committed Jan 30, 2025
1 parent dc445d7 commit d0a2e13
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Init/Data/Hashable.lean
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ instance : Hashable Bool where
| true => 11
| false => 13

instance : Hashable PEmpty.{u} where
hash x := nomatch x

instance : Hashable PUnit.{u} where
hash | .unit => 11

instance [Hashable α] : Hashable (Option α) where
hash
| none => 11
Expand Down

0 comments on commit d0a2e13

Please sign in to comment.