On Sun, Mar 1, 2009 at 6:42 PM, Martin Huschenbett <[email protected]> wrote:
> Hi,
>
> you could do something like
>
>> instance (Show a,Read a) => Binary a where
>>  put = put . show
>>  get = fmap read get
>
> But then you will need the following language extensions: FlexibleInstances,
> OverlappingInstances, UndecidableInstances
>
Well, isn't there a good chance it'll end up picking that instance
even when a more specific one is available, then?

I think the problem here is that I don't know of any way to inform GHC
that any particular instance is "less specific".
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to