Hi, how can I make the following code work? (show all the possible values of a type 'a')

showAll :: (Eq a, Bounded a, Enum a) => a -> [a]
showAll a = [minBound..maxBound]::[a]

it keeps saying that I could fix the problem by adding (Enum a) and (Bounded a) the the context, but I failed when I try.

anything goes wrong?

Thanks!

Raeck
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to