
Brandon Allbery
I think what you're reaching for here is a GADT:
data BasicSelect a where SelectionNum :: Num a => a -> BasicSelect a SelectionStr :: Show a => a -> BasicSelect a
I think you otherwise end up with a typeclass or with existentials; both introduce complexity, and I think the existentials solution still allows anything to be stuffed into it, whereas you want to limit it to SelectionNum or SelectionStr. (Typeclasses at least require an instance to be defined first; but they don't prohibit people from doing so, if that's what you're after.)
That's a bit of a contradiction, because you are using existentials yourself in your GADT. Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife >>= sex) http://ertes.de/