
2 Jan
2016
2 Jan
'16
2:53 p.m.
Hello all, I recently modeled a tree like this: data Predicate a = Any | Pred (S.Set a) data Product a = Pany | Prod (S.Set(Predicate a, S.Set(Product a))) What I wanted to achieve was to have each element only once on each level. Hence the Sets. But this structure does not achieve this. I can easily duplicate elements on a level as long as their subordinates are different, so I might as well give up working with sets. Is there a way to construct a tree where each element can occur only once on each level?