Skip to content

Add an instance for IArray (IOToDiffArray IOUArray) Bool

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.

Trac metadata
Trac field Value
Version 6.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries (other)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information