Text.Printf replacement?
Henning Thielemann
schlepptop at henning-thielemann.de
Sun Sep 8 18:29:10 CEST 2013
Am 06.09.2013 19:56, schrieb Bart Massey:
> TypeFamilies are kind of heavy machinery here :-), but since it would
> be confined to the library and seems to solve the problem, I'd be in
> favor of doing as you suggest. We can conditionally compile if we are
> worried about non-GHC implementations, I think. Do other folks have an
> opinion? --Bart
The right solution would be to have (>>) :: m () -> m a -> m a.
With this type GHC could infer the return type from the fact that the
result of printf is unused.
However, since it was chosen to be (>>) :: m b -> m a -> m a, we end up
with follow-up hacks.
More information about the Libraries
mailing list