[Haskell-cafe] Yet another top-level state proposal
isaacdupree at charter.net
Sat May 26 07:53:30 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Judah Jacobson wrote:
> Hi all,
> Given the recent discussion about adding top-level mutable state to
> Haskell, I thought it might be a good time to throw my own proposal
> into the ring. If enough people think it's worth considering, I can
> add it to the wiki page.
> In contrast to recent proposals, this one requires no extra syntax or
> use of unsafe functions by the programmer. Any nonstandard "magic"
> that might occur is kept within the compiler internals. Furthermore,
> top-level initializations are only executed when needed; merely
> importing a module does not cause any additional actions to be run at
> The core idea, similar to that of "type-based execution contexts" on
> the above wiki page, is to associate each top-level action with its
> own type.
I like the idea, similar to deriving(Typeable) in creating uniqueness.
Hopefully it can be made obvious somehow to code-readers unfamiliar with
it that the code is doing something unusual/controversial...
(P.S. having read the Top_level_mutable_state page now, it is definitely
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Haskell-Cafe