[commit: ghc] ghc-7.10: Define proper `MINIMAL` pragma for `class Ix` (0d58613)

git at git.haskell.org git at git.haskell.org
Sat Mar 7 22:19:07 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-7.10
Link       : http://ghc.haskell.org/trac/ghc/changeset/0d586136ce995f725bcaae064c98298d391ba178/ghc

>---------------------------------------------------------------

commit 0d586136ce995f725bcaae064c98298d391ba178
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sat Mar 7 23:15:07 2015 +0100

    Define proper `MINIMAL` pragma for `class Ix`
    
    This addresses #10142
    
    (cherry picked from commit 7a2d65a4d93273c89fbb1d19e282d5933c67c7ca)


>---------------------------------------------------------------

0d586136ce995f725bcaae064c98298d391ba178
 libraries/base/GHC/Arr.hs   | 4 ++--
 libraries/base/changelog.md | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libraries/base/GHC/Arr.hs b/libraries/base/GHC/Arr.hs
index cefef97..537382e 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 5635918..670fa11 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



More information about the ghc-commits mailing list