Closed yaitskov closed 4 years ago
Hi, thanks!
This is acceptable for now because we don't have to make it perfect. So I'll merge your change.
But it seems the project should be restructured even more, to have a separate engines easily accessible and with a good naming. In particular, see #8 .
An attempt to avoid orphan instance warning for Random.
I see that the app tries to represent multiple ways to solve problem - Free monad or Church monad. In the real app such situation would not happen.
From one side both solution must be independent and data RandomF must copy-pasted for every case or both Random instances must reside in the same module.
I thought about wrapping RandomF with a new type.
definition of RandomF is reused but I am not sure about the rest of dependent code base.
Besides orphan warning, trunk version is also asymmetric. Why RandomF Free instance is defined in together with type definition but F is not? I would expect to see 2 orphan warnings.