FixIO/ Tackling Awkward Squad

Marcin 'Qrczak' Kowalczyk [email protected]
16 Feb 2001 19:19:45 GMT


Fri, 16 Feb 2001 10:49:14 -0800, Levent Erkok <[email protected]> pisze:

> > fixIO m = let
> >     x = unsafePerformIO (liftM Box (m (unbox x)))
> >     in return (unbox $! x)
> 
> But that doesn't do the effects either..

Sorry, this one should be OK:

fixIO m = let
    x = unsafePerformIO (liftM Box (m (unbox x)))
    in return . unbox $! x

> By the way, the original version that Simon PJ wrote (with mvar's)
> didn't have any of these problems.

But used a heavy concept of concurrency to express something which
is more fundamental and doesn't need concurrency.

-- 
 __("<  Marcin Kowalczyk * [email protected] http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK