Add instance IsString ShowS where fromString = showString

Lennart Augustsson lennart at augustsson.net
Mon Oct 5 08:17:42 EDT 2009


-1

What Ganesh said.

On Mon, Oct 5, 2009 at 1:32 PM, Ross Paterson <ross at soi.city.ac.uk> wrote:
> On Sun, Sep 27, 2009 at 10:51:04PM +0200, Bas van Dijk wrote:
>> It would be really nice to use OverloadedStrings when constructing a
>> ShowS, for example in a definition of showsPrec in an instance for
>> Show.
>>
>> The patch attached in the ticket[3544] adds the necessary instance to
>> base/GHC/Show.lhs:
>>
>> instance IsString ShowS where
>>     fromString = showString
>>
>> Note that this does require TypeSynonymInstances.
>
> and also FlexibleInstances.  I think that's a problem, as Ganesh outlined.
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>


More information about the Libraries mailing list