[Haskell-cafe] how to check thunk

Chaddaï Fouché chaddai.fouche at gmail.com
Mon Jul 2 09:45:46 CEST 2012


On Mon, Jul 2, 2012 at 7:54 AM, Kazu Yamamoto <kazu at iij.ad.jp> wrote:
> Hello,
>
>> 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
>
> Great. I confirmed that this works with GHC 7.4.

Good news !

> # I removed the "a" parameter.

Yes, I wrote an horrible hybrid of two idea and the result don't
work... I suppose you got something like that :

> isThunk :: a -> IO Bool
> isThunk = fmap VC.isThunk . closureType

-- 
Jedaï



More information about the Haskell-Cafe mailing list