Proposal: Make amap an IArray method

David Feuer david.feuer at gmail.com
Fri Nov 14 23:25:17 UTC 2014


And in fact can't even go in IArray at all. Argh! Double error! I think
I'll go back under my rock.
On Nov 14, 2014 6:23 PM, "David Feuer" <david.feuer at gmail.com> wrote:

> Oh, I think I missed your point, that this operation really belongs in a
> *different* class—sorry.
> On Nov 14, 2014 5:07 PM, "Carter Schonwald" <carter.schonwald at gmail.com>
> wrote:
>
>> amap :: (IArray <http://Data-Array-IArray.html#t:IArray> a e', IArray
>> <http://Data-Array-IArray.html#t:IArray> a e, Ix
>> <http://../base-4.7.0.1/Data-Ix.html#t:Ix> i) => (e' -> e) -> a i e' ->
>> a i e
>>
>> this looks like map. just with a class constraint. I dont buy that theres
>> any ROI for putting it into the class at all.
>> By the same arguement, map and fold in Vector should be part of the class.
>>
>> -1
>>
>> On Fri, Nov 14, 2014 at 4:30 PM, David Feuer <david.feuer at gmail.com>
>> wrote:
>>
>>> I realized what I wrote about amap earlier was utterly boneheaded,
>>> because it has the wrong type for fmap. The only way to accomplish my goal
>>> is to make Data.Array.IArray.amap a method of the IArray class. This will
>>> allow IArray instances to offer optimized versions and things like
>>> amap/coerce rules. The current implementation of amap can become the
>>> default one.
>>>
>>> _______________________________________________
>>> Libraries mailing list
>>> Libraries at haskell.org
>>> http://www.haskell.org/mailman/listinfo/libraries
>>>
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20141114/6c95b354/attachment.html>


More information about the Libraries mailing list