Re: Stretching the Storage Manager a little too much...

2007-01-30 Thread Simon Marlow
Michael Weber wrote: [I am reading ghc-bugs via the list archives, Cc'ing me would make me see responses faster] Here's a simple memoization function: applyMemo :: (Eq a1,Show a1) = (a1 - b) - MVar [(a1,b)] - (a1 - b) applyMemo f refTable x1 = unsafePerformIO $ do -- print x1 table -

Stretching the Storage Manager a little too much...

2007-01-29 Thread Michael Weber
[I am reading ghc-bugs via the list archives, Cc'ing me would make me see responses faster] Here's a simple memoization function: applyMemo :: (Eq a1,Show a1) = (a1 - b) - MVar [(a1,b)] - (a1 - b) applyMemo f refTable x1 = unsafePerformIO $ do -- print x1 table - takeMVar refTable