
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?

Maybe StrictCheck fits your needs: https://hackage.haskell.org/package/StrictCheck. I haven't used it. I think there is a paper about it in ICFP 2018. On 8/13/20 8:32 PM, David Feuer 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?
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

StrictCheck is very useful, but not in this context—the values I'm looking
at are nodes in the spine of a data structure, not values it's storing.
On Thu, Aug 13, 2020, 2:42 PM Jaro Reinders
Maybe StrictCheck fits your needs: https://hackage.haskell.org/package/StrictCheck. I haven't used it. I think there is a paper about it in ICFP 2018.
On 8/13/20 8:32 PM, David Feuer 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?
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

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/P...
Best regards,
Marcin Szamotulski
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, August 13, 2020 8:32 PM, David Feuer
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?

Thanks, Marcin. That looks like what I'm after.
On Thu, Aug 13, 2020, 2:47 PM Marcin Szamotulski
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/P...
Best regards, Marcin Szamotulski
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Thursday, August 13, 2020 8:32 PM, David Feuer
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?
participants (3)
-
David Feuer
-
Jaro Reinders
-
Marcin Szamotulski