Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#2133 closed proposal (fixed)

Add an instance for IArray (IOToDiffArray IOUArray) Bool

Reported by: Deewiant Owned by: igloo
Priority: normal Milestone: Not GHC
Component: libraries (other) Version: 6.8.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

An instance for IArray (IOToDiffArray IOUArray) Bool is missing from Data.Array.Diff. There doesn't seem to be any good reason for this: all the other IArray UArray a instances defined in Data.Array.IArray have corresponding instances. Bool is the sole exception.

They cannot be added in user code without copying the entire Data.Array.Diff source, since the instances require internal functions which aren't exposed.

Since all the instances are defined in exactly the same way, only varying the second type parameter, this requires practically zero work: just copy any of the other instances and replace the type parameter with Bool. A Show instance should also be provided. Both are in the patch.

To be sure that the instances haven't been omitted because they don't work, I wrote a few QuickCheck? properties (attached) and it seems that it does work without any trouble.

Suggested deadline for discussion: 17th March 2008.

Attachments (2)

diffuarray_bool.patch (66.4 KB) - added by Deewiant 6 years ago.
diffuarray-bool-test.hs (1.2 KB) - added by Deewiant 6 years ago.

Download all attachments as: .zip

Change History (8)

Changed 6 years ago by Deewiant

Changed 6 years ago by Deewiant

comment:1 Changed 6 years ago by igloo

  • Difficulty set to Unknown
  • Milestone set to Not GHC

comment:2 Changed 6 years ago by Deewiant

Discussion time is over; the archive can be found at http://www.haskell.org/pipermail/libraries/2008-March/009414.html

No comments were made.

comment:3 Changed 6 years ago by igloo

  • Owner set to igloo

comment:4 Changed 6 years ago by igloo

  • Resolution set to fixed
  • Status changed from new to closed

Patch applied, thanks!

comment:5 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:6 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.