
10 Feb
2018
10 Feb
'18
12:18 p.m.
Ah, that makes sense, I forgot about the escaping issues.
On Sat, Feb 10, 2018 at 9:09 AM, David Feuer
On Feb 10, 2018 11:53 AM, "Kris Nuttycombe"
wrote: On Fri, Feb 9, 2018 at 7:07 PM, David Feuer
wrote: Other another bike-shed color:
traceWith :: (a -> String) -> a -> a traceWith f a = trace (f a) a
traceShowWith :: Show b => (a -> b) -> a -> a traceShowWith f = traceWith (show . f)
Is there some situation where the `Show String` instance wouldn't be in scope? If `b` is `String` it works out just fine, so the first definition you gave here seems superfluous.
If the strings have non-ASCII characters, show will mangle them.