-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Labels
Description
This issue was found whilst using tasty-bench, please refer to Bodigrim/tasty-bench#52 for more details.
Essentially I was able to reproduce this with the following minimal code:
bug :: String -> TestTree
bug title = withResource
(pure ((), ()) >>= evaluate . force)
(pure (pure ()))
((\(x,y) -> testCase title (unBenchmarkable (nf id (x,y)) maxBound)) . unsafePerformIO)
When I try to run this function I get Unhandled resource. Probably a bug in the runner you're using. This seems to be a bug since my test case does not depend on anything from the environment. I think what makes this fail is the fact I am pattern matching on the tuple, because if I rewrite my function to: (\x -> testCase title (unBenchmarkable (nf id x) maxBound) everything works.