[Haskell-cafe] Re: [Haskell] Top Level <-

Yitzchak Gale gale at sefer.org
Wed Sep 3 08:19:07 EDT 2008


I wrote:
>> For the short term - can we *please* get an ONLYONCE
>> pragma that has the correct semantics?

Sittampalam, Ganesh wrote:
> So the purpose of this pragma would solely be so that
> you can declare hs-plugins buggy for not respecting it?

No, the hs-plugins problem - whether hypothetical or
real - is only a symptom.

There is no way to define global variables in Haskell
right now. The NOINLINE hack is used, and most often
works. But really it's broken and there are no guarantees,
because NOINLINE does not have the right semantics.
This is demonstrated by your hs-plugins example, but
it's a general problem.

Until a permanent solution is implemented and deployed
in the compilers (if ever), can we please have a pragma
that allows the current hack to really work?

Thanks,
Yitz


More information about the Haskell-Cafe mailing list