29 Nov
2001
29 Nov
'01
1:29 p.m.
As you say, we can't change the type of showInt. I suppose we could add:
showIntAtBase :: Integral a=20 =3D> a -- base -> (a -> Char) -- digit to char -> a -- number to show. -> ShowS
showOct, showHex :: Integral a =3D> a -> ShowS
Q1: But would we really want showDec too? Identical to existing showInt?
I only suggested it for consistency of naming. However, since showInt is not the dual of readInt, we can't have consistency anyway. Regards, Malcolm