[Haskell-cafe] Re: What do _you_ want to see in FGL?

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Mon Apr 26 05:00:23 EDT 2010

Christian Maeder <Christian.Maeder at dfki.de> writes:

> Ivan Lazar Miljenovic schrieb:
>>     - Having a separate parameter (using associated types?) for the node
>>       type rather than just using Int.
> "Just Int" for nodes was disappointing. It should have been at least a
> "newtype". 

This then loses you all of the advantages of using Int (pre-defined data
type with known space usage, ordering, etc. and the ability to use
IntMap and IntSet which out-perform the normal ones).

> I would vote against these experimental features like associated types
> or MPTC and FD.  I prefer plain type parameters for data types, but
> that does not fit well together with type classes.

Why don't you like extensions?  I used to feel the same way, but then
someone pointed out to me that just because Haskell98 doesn't have them
doesn't mean they aren't good/useful, and we should be coding for
_modern_ Haskell.

>> * Better fundamental data structures: one of the things that has always
>>   annoyed me about FGL is how much it uses tuples; I propose re-defining
>>   the Context type to be a record-based data structure.  Also, usage of
>>   Sets, Maps, etc. where applicable.
> Right, these tuples annoyed me, too. (If this changes, it will break a
> lot of our existing code, though.)

All of my proposals will break existing code though, but I believe for
the better.  We can't be afraid to innovate/change our libraries,
otherwise they can't improve.

Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com

More information about the Haskell-Cafe mailing list