unsafePerformIO safety.

Lennart Augustsson lennart at augustsson.net
Wed Mar 7 03:28:38 EST 2007

I wouldn't like if unsafePerformIO could never be inlined, sometimes  
you want it inlined for performance.
And not all uses are hacky, it's just that when I use it, then burden  
is on me to convince myself that it is safe.

On Mar 6, 2007, at 23:56 , Neil Mitchell wrote:

> Hi
> On 3/6/07, Lennart Augustsson <lennart at augustsson.net> wrote:
>> Yeah, you really need {-# NOINLINE var #-} to make it reasonable  
>> safe.
> Couldn't GHC bake in knowledge about unsafePerformIO, and never inline
> it? It is a slightly hacky solution, but since unsafePerformIO is
> pretty much only used in hacks, I think its almost fitting.
> Thanks
> Neil

More information about the Glasgow-haskell-users mailing list