Hi,

Primarily I want to see in FGL: documentation, documentation and more documentation. The library has lots of undocumented functions (especially the queries, e.g. http://hackage.haskell.org/packages/archive/fgl/5.4.2.2/doc/html/Data-Graph-Inductive-Query-DFS.html has no documentation at all), and the only reference is the original paper. I've seen several people who didn't read the paper (or didn't read the right bits) get confused by the inductive way the graph is constructed, when they try to de-construct it.

I would also like to see the library reduced in size/scope if possible; there's a lot of modules in FGL, but all I've ever used are D.G.I.Graph, D.G.I.Tree, D.G.I.Graphviz and D.G.I.Query.DFS. I consider this to probably be the most common usage of the library by others too (if you throw in D.G.I.Query.BFS). So by the sounds of it, if you split Graphviz and Query off to separate libraries, I probably only use the core module.

Ivan Lazar Miljenovic wrote:
Here are some ideas that I have regarding FGL:

* 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.
I think this is worth doing, even if it does break code. If you're doing Context, you may as well do LNode and LEdge too.

* Data.Graph.Inductive.Monad: does anyone actually use this?
No, now that I look at it, it's not what I would expect. It seems to be a lot of operations that could be constructed by sticking liftM before the normal operations. For example:

nodesM :: GraphM m gr => m (gr a b) -> m [Node]

I would have thought the useful operations for graphs and monads would have been something more like:

nodesM :: GraphM m gr => gr (m a) (m b) -> m [Node]

On that node, I would like to see some instances for the graph types: particularly Functor, Foldable and Traversable, for both (Gr a) and (Flip Gr b) -- where Flip is http://hackage.haskell.org/packages/archive/TypeCompose/latest/doc/html/Control-Compose.html#t:Flip or http://hackage.haskell.org/packages/archive/category-extras/latest/doc/html/Control-Functor-Combinators-Flip.html

If you put FGL in a repository somewhere, I might be able to find some time to write those instances and perhaps contribute a bit of documentation (no promises, though!).

Thanks,

Neil.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to