[Haskell-cafe] Re: ShowList magic

Abby Henríquez Tejera paradoja at gmail.com
Mon May 17 10:53:48 EDT 2010



On 17 mayo, 04:00, Ivan Miljenovic <ivan.miljeno... at gmail.com> wrote:
> On 17 May 2010 12:56, Abby Henríquez Tejera <parad... at gmail.com> wrote:
> [...]
> There would then be something like:
>
> instance (Show a) => Show [a] where
>     show = showList
>
> So, depending on the type used, it will either use the special ".."
> method (for String = [Char]) or the default one (or another special
> one if another data type overrides the default implementation for
> Show).
>
> Seehttp://book.realworldhaskell.org/read/using-typeclasses.htmlfor
> more information.
>

I had already read the RWH chapter, but still didn't understand it,
but now (preparing to answer you why I didn't «see» it), it suddenly
all came clear. Oh, I hate this moments, now I feel stupid :).

Thank you very much.

Salud,
Abby


More information about the Haskell-Cafe mailing list