Skip to content

Fix instance for `Bounded (Down a)`

Summary

Currently the instance keeps the same minBound and maxBound as the underlying type a rather than flipping them to respect the change in ordering.

Steps to reproduce

λ> (minBound @Bool, minBound @(Down Bool))
(False,Down False) 

Expected behavior

λ> (minBound @Bool, minBound @(Down Bool))
(False,Down True) 

Environment

  • GHC version used: GHC 8.10.2

Optional:

  • Operating System:
  • System Architecture:
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information