External Publication
Visit Post

GHC Proposal: Top-level IO initialized bindings

Haskell Community [Unofficial] July 1, 2026
Source

Ambrose:

What’s wrong with the existing way to do it?

Do the “sharp edges” mentioned under Motivation not answer that?

My immediate motivation for this thread is me wanting to use top-level unsafePerformIO + NOINLINE at work, and hearing concerns about “we’ve seen it inlined in the past, so we don’t trust it”. To me, there’s nothing inherently unsafe about top-level IO, the distrust only comes about because of GHC’s mysterious optimization rules. I’d prefer there was a semantic way to do this that could be relied upon as a language construct, and not just a magic incantation GHC may or may not respect.

Ambrose:

I’m sorry but that i read a NOINLINE vs OPAQUE discourse thread and then see a ghc proposal about it is wild to me LOL

ha yeah, it is a bit amusing on the outside, but I’ve been mulling on this for years already. This was just a breaking point, I guess

Discussion in the ATmosphere

Loading comments...