People have written:

 | Or you can do what hbc has done for donkey's years
 | and include 'showType' in Show.
 :
 | Incidentally, nhc98 also has had 'showType' in class
 | Show since the year dot - only Hugs and ghc lack it.  
 | (Does anyone know why this idea didn't make it into
 | Haskell'98?)

I don't think this is a good idea since the fact that an
element of a type is showable has nothing to do with if the
type itself is showable.

In particular, all types have a string representation, but
not all elements of all types. For example, functions cannot
be shown, but it is easy to show the type of a function.

So, it is a good idea to keep the classes Show and
ShowType/Typeable separately.

/Koen.

--
Koen Claessen         http://www.cs.chalmers.se/~koen     
phone:+46-31-772 5424      e-mail:[EMAIL PROTECTED]
-----------------------------------------------------
Chalmers University of Technology, Gothenburg, Sweden


Reply via email to