Discussion: expand documentation of amap for IArray

David Feuer david.feuer at gmail.com
Fri Nov 14 17:27:46 UTC 2014


The current documentation for Data.Array.IArray.amap says what it does, but
doesn't say anything about how it should (and shouldn't!) be used.
Specifically, it does not implement amap/amap or amap/coerce rules, and it
probably cannot do so safely if the IArray instance does not satisfy the
appropriate lens-like laws. Thus the most appropriate way to use this
function is probably to implement the Functor instance for an IArray type,
using type-specific RULES. It's probably *not* such a hot idea to use this
amap directly. I don't know if all that should be crammed, with
explanation, into the Haddocks or if there's a better way to handle it.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20141114/19c3309c/attachment-0001.html>


More information about the Libraries mailing list