3 ms·
I can see your point here, but since time is fundamentally an external datum provided by the system, in my view there's no reason to screw with Haskell's intern
by kwantam 16y ago
I can see your point here, but since time is fundamentally an external datum provided by the system, in my view there's no reason to screw with Haskell's internals when you can just produce the necessary simulated environment in which your runtime lives. Moreover, by doing it this way you can use exactly the same code in testing as in production, reducing the risk of something going wrong when you change from the former to the latter codebase.
- kunley 16y agoI totally agree. The OP came with a great way of simulating certain states of the external environment for the purpose of tests and completely independently of the implementation. This decoupling seems uber cool.