12 Oct
2004
12 Oct
'04
10:34 a.m.
"Simon Marlow" <simonmar@microsoft.com> writes:
I'd like to add that while the implementation might be a little unsafe, there's no problem in principle with the semantics of top-level IORefs. We could add such a thing as a GHC extension, but it would be nice if it were an instance of a more general-purpose extension.
Top-level MVars also make sense, the extension should not be limited to IORefs. But permitting arbitrary values makes unsafePerformIO official and opens a hole in the type system for polymorphic variables (can such polymorphism be hidden in an apparently monomorphic datatype?). -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/