show function

Christian Maeder maeder at tzi.de
Wed Dec 3 14:54:56 EST 2003


rui yang wrote:
> I want to print a function which itself have some functions as it's parameters 
> and will return some functions as the results, and I want to print out the 
> result, does anyone knows how to define the instance declaration of show class 
> to this function type?

I don't know if it is possible to define a Show-instance for a function
type, but you should not do so, because functions are usually
"unshowable". If you have a function as a result you can only apply it
to some further argument and (try to) show the result of that application.

HTH Christian



More information about the Haskell mailing list