
1 Feb
2007
1 Feb
'07
12:11 p.m.
On 2007 Feb 1, at 11:51 AM, David House indited:
On 01/02/07, Bulat Ziganshin
wrote: there is common proposal that i support. example of its use:
i :: IORef Int i <- newIORef 1
with a semantics equivalent to current use of usafePerformIO +INLINE in GHC
I think that's too safe-looking. Anything that translates to something involving unsafe* should be tagged with 'unsafe' somewhere as well. Also, as unsafe* is still compiler specific, I think a pragma is probably most appropriate:
{-# GLOBAL-MUTVAR #-} i :: IORef Int i = unsafePerformIO (newIORef 1)
Hear hear! As a Haskell newbie things are hard enough to keep straight without that kind of magical unsafe stuff going on. Just sayin' --D'gou