HMock
HMock copied to clipboard
HMock for plain old Haskell modules
Migrated from TODO file.
It would be nice to use HMock to generate an implementation of an API in a plain Haskell module. The user would then select the appropriate implementation by using build-system tricks like backpack or CPP when compiling the system under test.
This requires a global set of expectations rather than tracking expectations in a monad wrapper. We'd also need a way to reset those global expectations before and after a test. They should also have a version number, so that stray threads from previous tests can just fail instead of making a mess in the current test.