Add instance IsString ShowS where fromString = showString

Bas van Dijk v.dijk.bas at gmail.com
Sun Sep 27 16:51:04 EDT 2009


Hello,

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.

Discussion period 2 weeks.

regards,

Bas

[3544] http://hackage.haskell.org/trac/ghc/ticket/3544


More information about the Libraries mailing list