
19 May
2019
19 May
'19
1:08 p.m.
Hello Matt, On Sun, May 19, 2019 at 09:17:50AM -0600, Matt wrote:
I would suggest that `MonadTime` and `MonadKeys` are not great choice for a Layer 2 - it would be really difficult to write a mock for MonadKeys that was in any way meaningful. I'd suggest restricting these classes to be tightly coupled to your domain problem. Instead of getting random keys, try a sum-type with all the possible things you'd prompt the user for, and a type for possible user responses. This is much easier to mock meaningfully.
excellent explanation and excellent suggestions, many thanks -F