[Haskell-cafe] Are newtypes optimised and how much?
Gregory Crosswhite
gcross at phys.washington.edu
Wed Oct 20 11:58:44 EDT 2010
On 10/20/10 4:09 AM, Simon Peyton-Jones wrote:
> No, this isn't optimised. The trouble is that you write (map Foo xs), but GHC doesn't know about 'map'. We could add a special case for map, but then you'd soon want (mapTree Foo my_tree).
How about a special case for fmap? That seems like it should handle a
lot of cases.
Cheers,
Greg
More information about the Haskell-Cafe
mailing list