
I have some type-level sets using fundeps working whereby equality and membership etc are predicate functions. This seems to leads to an explosion of ugly code, with `If' class constraints etc getting out of hand -- I want to treat these as relations instead so providing the definition describes everything that is 'in' and nothing that is 'out'. I've been using Oleg's paper on lightweight static resources [1] as a template for this. I want to do something like this (supposing I have an EQ relation, (:::) for consing): class Member x y instance EQ x y => Member x (y:::ys) instance Member x ys => Member x (y:::ys) But I can certainly see why this isn't possible (It's the equivalent of pattern-matching on the constraints I suppose). Do type families provide a way to do this kind of thing or do I need a different strategy altogether, involving GADTs or whatever? Thanks, [1] http://okmij.org/ftp/Computation/resource-aware-prog/tfp.pdf -- View this message in context: http://www.nabble.com/fundeps-and-overlapping-undecidable-instances-tf496299... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.