[Haskell] Re: RFC: DData in hierarchical libraries

John Meacham john at repetae.net
Fri Mar 12 16:09:24 EST 2004


On Fri, Mar 12, 2004 at 04:06:57PM +0100, Ketil Malde wrote:
> "Daan Leijen" <daanleijen at xs4all.nl> writes:
> 
> > Simon Marlow wrote:
> >> 'insert map key x'
> 
> > So we can do supposedly common things like:
> >   any (member s) xs
> >   map (lookup m) ks
> 
> > the current design is nicer so I don't think we should get into
> > long discussions about which partial application occurs more often
> > unless we can back it up with data :-)
> 
> If you want a data point, I grepped quickly through my sources and
> found a handful of "map (lookupFM fm) xs"-type constructs.
> 
> > more -- so if many others like it better too, I might be persuaded
> > to adapt the implementation. However, this requires quite a bit of
> > work, so I would like to leave this issue open for discussion for a
> > while.
> 
> I've no really strong preference, but would vote for keeping the order
> defined by the old FiniteMap and Set implementations, if for no other
> reason than being more compatible.

Ack. the new, consistant, useful order and regular bias are some of my
major reasons for prefering DData. If you want to do many things to the
same Map, there are plenty of functions for dealing with lists of things
to add or whatnot, the partially aplied functions with the map at the
end give new, useful functionality orthogonal to the list dealing with
functions.

hope this makes sense.

        John

-- 
---------------------------------------------------------------------------
John Meacham - California Institute of Technology, Alum. - john at foo.net
---------------------------------------------------------------------------


More information about the Libraries mailing list