summaryrefslogtreecommitdiff
path: root/libraries/base/Data/Type/Equality.hs
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2016-06-04 17:59:47 -0400
committerRyan Scott <ryan.gl.scott@gmail.com>2016-06-04 17:59:48 -0400
commit59651173a52e2400f965e38acd0beb9d0cc14cfe (patch)
treebbcf735fdbf1a7f1975f37b3c5b887a2933016cf /libraries/base/Data/Type/Equality.hs
parentb948a1da7a3929160cb7cb8d6cf2fe79c3081d0a (diff)
downloadhaskell-59651173a52e2400f965e38acd0beb9d0cc14cfe.tar.gz
Replace hand-written Bounded instances with derived ones
Summary: The spiritual successor to D2291, since deriving `Bounded` instances in `GHC.Enum` wasn't possible prior to changes made in that Diff. This Diff finds every manually implemented `Bounded` instance in `base` that is completely equivalent to the derived instances, and replaces it. Reviewers: bgamari, goldfire, austin, hvr Reviewed By: austin, hvr Subscribers: thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D2301
Diffstat (limited to 'libraries/base/Data/Type/Equality.hs')
-rw-r--r--libraries/base/Data/Type/Equality.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/libraries/base/Data/Type/Equality.hs b/libraries/base/Data/Type/Equality.hs
index 19c9bcacf2..b22b39d921 100644
--- a/libraries/base/Data/Type/Equality.hs
+++ b/libraries/base/Data/Type/Equality.hs
@@ -131,9 +131,7 @@ instance a ~ b => Enum (a :~: b) where
fromEnum Refl = 0
-instance a ~ b => Bounded (a :~: b) where
- minBound = Refl
- maxBound = Refl
+deriving instance a ~ b => Bounded (a :~: b)
-- | This class contains types where you can learn the equality of two types
-- from information contained in /terms/. Typically, only singleton types should