Make Prelude's map = fmap

Edward A Kmett ekmett at gmail.com
Sat Jun 22 01:28:32 CEST 2013


Wren gave what I think is the principal potential blocker: if we are to proceed with generalizing map, we really need to know the practical impact on foldr/build fusion. 

NB: This is also a lingering concern for the Foldable/Traversable generalization.

That said, I do not believe these would be a problem as the RULES involved impact only a single instance, and these have worked well for me in the past.

Even so, having data would definitely go a long way towards assuaging fears of this sort!

-Edward

On Jun 21, 2013, at 6:11 PM, "wren ng thornton" <wren at freegeek.org> wrote:

> On 6/21/13 5:12 PM, Matthias Kilian wrote:
>> On Fri, Jun 21, 2013 at 04:53:49PM -0400, Carter Schonwald wrote:
>>> I'd support the map=fmap thing,
>> 
>> Does it cause any consequences for existing libraries and programs?
>> Does it break any existing Haskell98 (or Haskell2010) code?
>> 
>> If not: fine. But if yes: please don't do it.
> 
> As with the Foldable/Traversable stuff, there's the impediment of ensuring
> that list fusion still works right.
> 
> This is hopefully a minor issue and can be easily resolved by
> inlining/monomorphizing at the appropriate stage; however, it is a
> technical issue that needs to be addressed by the time we actually
> implement the change.
> 
> -- 
> Live well,
> ~wren
> 
> 
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries



More information about the Libraries mailing list