Skip to content
Snippets Groups Projects
Commit ed69dbe9 authored by Simon Marlow's avatar Simon Marlow
Browse files

[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.
parent e421cf95
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment