[commit: ghc] master: Define proper `MINIMAL` pragma for `class Ix` (7a2d65a)

git at git.haskell.org git at git.haskell.org
Sat Mar 7 22:15:35 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/7a2d65a4d93273c89fbb1d19e282d5933c67c7ca/ghc

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

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

    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


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

7a2d65a4d93273c89fbb1d19e282d5933c67c7ca
 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 ee666eb..6b3a923 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