Add instance IsString ShowS where fromString = showString
ganesh.sittampalam at credit-suisse.com
Mon Oct 5 05:42:03 EDT 2009
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
> The patch attached in the ticket adds the necessary instance to
> instance IsString ShowS where
> fromString = showString
> Note that this does require TypeSynonymInstances.
-1 : I don't think it's appropriate to use a type synonym instance in a
A concrete example of the problems this would cause is that it would
interfere with any generic function instance for IsString, e.g.
instance IsString b => IsString (a -> b) where
fromString = const . fromString
I am not suggesting that such an instance is generally useful, but
people who wanted to use it in their own private code would be
obstructed from doing so by an instance for (String -> String).
Please access the attached hyperlink for an important electronic communications disclaimer:
More information about the Libraries