
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". 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.
* 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.) I also did not like the list of links, that let me redefine the context data type (although it does not fit well into the current class): newtype Gr a b = Gr { convertToMap :: Map.IntMap (GrContext a b) } data GrContext a b = GrContext { nodeLabel :: a , nodeSuccs :: Map.IntMap [b] , loops :: [b] , nodePreds :: Map.IntMap [b] } http://trac.informatik.uni-bremen.de:8080/hets/browser/trunk/Common/Lib/Grap... Maybe "Ord b" should be required for edge labels "b" (in order to use sets), although it may make sense to have many edges with the same label between the same two nodes. However, for this special case the user could provide an additional index or a counter.
* Data.Graph.Inductive.Monad: does anyone actually use this?
I did not use it. (I've got no opinion about the other points you made.) Cheers Christian