Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is pretty much correct. For reference, here’s the original documentation (changed in commit 80ff4a3018cd8909abb1d4e0c32f012a523883ec):

    -- | Just like unsafePerformIO, but we inline it. Big performance gains as
    -- it exposes lots of things to further inlining. /Very unsafe/. In
    -- particular, you should do no memory allocation inside an
    -- 'inlinePerformIO' block. On Hugs this is just @unsafePerformIO@.
The commit message notes that ‘We've had a few instances of people being tempted to use it without really understanding the consequences’.


I wonder why inlining the function makes it that much unsafe.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: