Proposal: Add an instance for IArray (IOToDiffArray IOUArray) Bool
matti.niemenmaa+news at iki.fi
Sun Mar 2 10:38:12 EST 2008
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 (attached to the ticket).
To be sure that the instances haven't been omitted because they don't work, I
wrote a few QuickCheck properties (attached to the ticket) and it seems that it
does work without any trouble.
Suggested deadline for discussion: 17th March 2008.
More information about the Libraries