On Mon, Jul 2, 2012 at 5:29 AM, Kazu Yamamoto <k...@iij.ad.jp> wrote:
> 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ï

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to