Text.Printf replacement?
Twan van Laarhoven
twanvl at gmail.com
Fri Sep 6 17:18:55 CEST 2013
On 06/09/13 04:16, Bart Massey wrote:
> A final issue has to do with the return type of Text.Printf.printf,
> which is polymorphic between String and IO a. I'm sure this seemed
> like a good idea at the time, but it's not so ideal today: GHC gives a
> warning when printf is used at IO a unless you explicitly ignore the
> result.
You can probably force the `a` to be `()` by using:
instance (a ~ ()) => PrintfType (IO a) where ...
But that is of course not standard Haskell.
Twan
More information about the Libraries
mailing list