
2 Jul
2012
2 Jul
'12
1:40 a.m.
On Mon, Jul 2, 2012 at 5:29 AM, Kazu Yamamoto
Hello,
Are there any ways to see if a value is a thunk or memorized? I would like to have a function like: isThunk :: a -> IO Bool
vacuum allow that and much more though I don't know if it still works correctly on GHC 7.4. Anyway your isThunk is
isThunk a = fmap GHC.Vacuum.ClosureType.isThunk GHC.Vacuum.closureType
(Feel free to arrange your imports to make that a bit more readable ;) http://hackage.haskell.org/package/vacuum -- Jedaï