My early intention was to limit the EW data type to showable/readable values. It wanted it to only accepting one of these.
Now I have even two alternatives to choose :-)
Thanks
Hartmut
On Aug 7, 2011, at 5:54 PM, Hartmut wrote:David,
that was fast :-) Thank you for your help!
HartmutYour welcome. ;-) I needed the break from what I was doing. I think I actually would like to add that normally i wouldn't put the class constraints in the data type definition.module Main wheredata EW a = EW ax01 = EW 20x02 = EW "Test"instance (Show a) => Show (EW a) whereshow (EW x) = show "EW:" ++ show xinstance (Read a) => Read (EW a) whereread (etc...)____________________David Place
Owner, Panpipes Ho! LLC