[Haskell-cafe] Is it a thunk?

Marcin Szamotulski profunctor at pm.me
Thu Aug 13 18:47:32 UTC 2020


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/a2089737/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 509 bytes
Desc: OpenPGP digital signature
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20200813/a2089737/attachment.sig>


More information about the Haskell-Cafe mailing list