summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2015-03-07 23:15:07 +0100
committerHerbert Valerio Riedel <hvr@gnu.org>2015-03-07 23:15:07 +0100
commit7a2d65a4d93273c89fbb1d19e282d5933c67c7ca (patch)
treec9a4627fd4788f29343e4986486e93c9780109f6
parent47b5b5c2b2c92ba091313c36489588edadceaa9d (diff)
downloadhaskell-7a2d65a4d93273c89fbb1d19e282d5933c67c7ca.tar.gz
Define proper `MINIMAL` pragma for `class Ix`
Summary: This addresses #10142 Reviewers: goldfire, austin, ekmett Reviewed By: austin, ekmett Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D709 GHC Trac Issues: #10142
-rw-r--r--libraries/base/GHC/Arr.hs4
-rw-r--r--libraries/base/changelog.md2
2 files changed, 4 insertions, 2 deletions
diff --git a/libraries/base/GHC/Arr.hs b/libraries/base/GHC/Arr.hs
index ee666eb34d..6b3a923dbc 100644
--- a/libraries/base/GHC/Arr.hs
+++ b/libraries/base/GHC/Arr.hs
@@ -71,9 +71,9 @@ default ()
--
-- * @'rangeSize' (l,u) == 'length' ('range' (l,u))@ @ @
--
--- Minimal complete instance: 'range', 'index' and 'inRange'.
---
class (Ord a) => Ix a where
+ {-# MINIMAL range, (index | unsafeIndex), inRange #-}
+
-- | The list of values in the subrange defined by a bounding pair.
range :: (a,a) -> [a]
-- | The position of a subscript in the subrange.
diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md
index 5635918b3f..670fa11164 100644
--- a/libraries/base/changelog.md
+++ b/libraries/base/changelog.md
@@ -141,6 +141,8 @@
* Add/expose `rnfTypeRep`, `rnfTyCon`, `TypeRepHash`, and
`TyConHash` helpers to `Data.Typeable`.
+ * Define proper `MINIMAL` pragma for `class Ix`. (#10142)
+
## 4.7.0.2 *Dec 2014*
* Bundled with GHC 7.8.4