Can NOINLINE fail to prevent inlining?
Haskell Community [Unofficial]
June 27, 2026
Indeed, it apparently can inline the wrapper. But it should never inline the worker, which is the part that would contain the actual unsafePerformIO and the initialization of the IORef, so that is still safe.
Discussion in the ATmosphere