[Haskell-cafe] How to derive instance for type without exported constructor?

Miguel Mitrofanov miguelimo38 at yandex.ru
Fri Sep 4 13:30:48 EDT 2009


Just copypasted it from my own email. Works fine.

On 4 Sep 2009, at 20:05, Grigory Sarnitskiy wrote:

>
>> This time I've checked that it really compiles. Pretty much sure it  
>> works.
>
> But how?! I'can't compile it:
>
> test.hs:11:2:
>    Conflicting definitions for `put''
>    Bound at: test.hs:11:2-5
>              test.hs:13:2-5
>              test.hs:20:2-5
>    In the default-methods for class Binary'
>
> test.hs:12:2:
>    Conflicting definitions for `get''
>    Bound at: test.hs:12:2-5
>              test.hs:15:2-5
>              test.hs:21:2-5
>    In the default-methods for class Binary'
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



More information about the Haskell-Cafe mailing list