[project @ 2001-08-29 09:34:05 by simonmar]
authorsimonmar <unknown>
Wed, 29 Aug 2001 09:34:05 +0000 (09:34 +0000)
committersimonmar <unknown>
Wed, 29 Aug 2001 09:34:05 +0000 (09:34 +0000)
commited69dbe99f356815f0ae8da34fc87da44bbcbef4
treed0b93e1fb9e56e1ff99b3a1909c05fb4e7180da0
parente421cf9575e85cfab7fd6807b6325223080b412a
[project @ 2001-08-29 09:34:05 by simonmar]
Changes to the Ix class from the revised Haskell 98 report:

  - Ord is no longer a superclass of Ix.

  - rangeSize is now a class member, as there are cases when
    it is useful to be able to override it.  As a result, GHC's
    performance-improving "unsafeRangeSize" function also has to be
    a class method just in case the programmer has overriden
    rangeSize.  Of course, unsafeRangeSize isn't visible when just
    importing Ix.

  - Added unsafeRangeSize bindings to all our standard Ix instances.

  - Improved the Ix instances for Int{8,16,32,64} and
    Word{8,16,32,64} by defining unsafeIndex instead of index, and
    providing a definition of unsafeRangeSize.

I hope I haven't mucked anything up :) The array tests all pass
successfully, except for arr016 which depended on Ord being a
superclass of Ix.  I'll commit changes to this test shortly.
ghc/lib/std/Ix.lhs
ghc/lib/std/PrelArr.lhs
ghc/lib/std/PrelEnum.lhs
ghc/lib/std/PrelInt.lhs
ghc/lib/std/PrelWord.lhs