varying function by typeclass

Abraham Egnor aegnor@antioch-college.edu
Wed, 23 Jul 2003 00:10:43 -0400


I have a function that takes, among other things, a (wrapped) generic
type, i.e. "forall a. a".  My function can possible produce an error
message; is there any way to set up the function so that if the type is an
instance of Show include the value along with the error message?  I can't
think of any, and this is honestly the first time I've been directly
frustrated by Haskell's typesystem, so it's bugging me more than it might
otherwise.  Any suggestions?

Abe