[Haskell-cafe] Re: What does the Haskell type system do with "show
maeder at tzi.de
Fri Jan 13 05:12:08 EST 2006
Jared Updike wrote:
I still don't see, why it works for show but not for my_show.
> On 1/12/06, Jeff.Harper at handheld.com <Jeff.Harper at handheld.com> wrote:
>> class (Show a) => My_show a where
>> my_show :: a -> String
If I let this be
class My_show a where
my_show :: a -> String
>> instance My_show Int where
>> my_show a = show a ++ " :: Int"
>> instance My_show Integer where
>> my_show a = show a ++ " :: Integer"
What is the difference to the builtin Show class?
More information about the Haskell-Cafe