Eff
from atnos-eff has a function addLast
which allows us to register the side-effects we want to execute at the end.
But I think the implementation has some issues:
- This feature is probably NOT described original paper
- so we cannot find out what is the right behavior of this😇
- And this can be done by the original Eff idea without special modification for
Eff
data structure - In atnos-eff,
last
ofEff
is handled liketry-catch-finally
logic ofMonadError
but- the last logic is not the same of
try-catch-finally
because the last logic should be actually done in the last if someEff
s are flatmapped - on the other hand, the error handling should be able to be applied to a specific
Eff
data, and it doesn't need to be done in the final
- the last logic is not the same of
This repository is a PoC of (2).
Discussions are very welcome. Thank you for the reading!
You can try it out by the following command.
./sbt test
I would like to thank @halcat0x15a and @xuwei-k for many advices. But if there could be any mistakes in this repository, they were nothing to do with that.