[Haskell-beginners] Point free mystery

martin martin.drautzburg at web.de
Wed Apr 15 19:31:27 UTC 2015


Helly all

for ad-hoc benchmarking I wrote

bench x = (timeIt . print) x

Hlint suggested

Found:
  bench x = (timeIt . print) x
Why not:
  bench = (timeIt . print)

but when I do this, I get

    No instance for (Show a0) arising from a use of ‘print’

Why is that so?


More information about the Beginners mailing list