
19 Feb
2016
19 Feb
'16
6:25 a.m.
On Fri, Feb 19, 2016 at 12:07:14PM +0100, Johannes Waldmann wrote:
.. a graph that described which people own which hamsters,
This is a bipartite graph, or, a relation. You want a type like
data Rel src tgt a = Rel { fore :: ! ( M.Map src (M.Map tgt a) ) , back :: ! ( M.Map tgt (M.Map src a) ) }
where src = People, tgt = Hamster, and a = Bool.
I agree. FGL seems inappropriate to model people owning hamsters because you genuinely want to reflect the difference between people and hamsters by having two different node types.