[Haskell-cafe] Problem on overlapping instances

Luke Palmer lrpalmer at gmail.com
Wed Jan 5 09:34:16 CET 2011

You can't.  If you have special semantics for [String], then it is not
really a [String], it is something else.  So let the type system know

newtype SomethingElse = SomethingElse [String]

instance Binary SomethingElse where

On Wed, Jan 5, 2011 at 1:24 AM, Magicloud Magiclouds
<magicloud.magiclouds at gmail.com> wrote:
> Hi,
>  I am using Data.Binary which defined "instance Binary a => Binary
> [a]". Now I need to define "instance Binary [String]" to make
> something special for string list.
>  How to make it work? I looked into the chapter of
> overlappinginstances, nothing works.
> --
> 竹密岂妨流水过
> 山高哪阻野云飞
> _______________________________________________
> 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