[Haskell-beginners] Point free mystery

Brandon Allbery allbery.b at gmail.com
Wed Apr 15 19:42:37 UTC 2015


On Wed, Apr 15, 2015 at 3:31 PM, martin <martin.drautzburg at web.de> wrote:

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

hlint is kinda dumb sometimes, like any heuristic analyzer. In particular,
it recognizes patterns of code, but knows nothing about types. Or, in this
case, the monomorphism restriction, which is likely messing with the
inferred type (since the inferred type is correct when it has a parameter).

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150415/a1e34bff/attachment.html>


More information about the Beginners mailing list