[Haskell-cafe] Is it a thunk?

David Feuer david.feuer at gmail.com
Thu Aug 13 18:54:02 UTC 2020


Thanks, Marcin. That looks like what I'm after.

On Thu, Aug 13, 2020, 2:47 PM Marcin Szamotulski <profunctor at pm.me> wrote:

> Hi David,
>
> At IOHK we are using `ghc-heap` which is bundled with a recent version of
> ghc. We have a bit of architecture which allow to test for unexpected
> thunks and it worked very well for us:
> https://github.com/input-output-hk/cardano-prelude/blob/master/src/Cardano/Prelude/GHC/Heap/NormalForm/Classy.hs#L69
>
> Best regards,
> Marcin Szamotulski
>
>
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Thursday, August 13, 2020 8:32 PM, David Feuer <david.feuer at gmail.com>
> wrote:
>
> For testing purposes, I'd like to distinguish between thunks and
> non-thunks, to make sure that everything I require to be forced is. (I'd
> also like to know that nothing that's supposed to be lazy is forced, but
> that seems too hard to test in context.) Is there some magic I can use to
> check?
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20200813/b8a471dc/attachment.html>


More information about the Haskell-Cafe mailing list