Closed harendra-kumar closed 7 years ago
Closing this after discussing with @agocorona. Transient avoids transformers for simplicity and beginner friendliness. I am however experimenting with transformers support and some other stuff in a separate fork for now.
Transient now implements a transformer monad named
AsyncT
that provides composition of asynchronous effects on top of any monad that implementsMonadIO
. It can be used anywhere in a transformer stack. I might add a few more commits with minor changes (e.g. exporting the transformer interface, renaming of fields etc.), but this commit captures the essence of the change.TransIO
is now implemented asAsyncT IO
. There is no change in external APIs except that now you have to use a newsetSData
API in place ofsetData
inside TransIO, just likegetSData
for get operation. This will require a version bump.The change consists of largely signature changes. I have tried to keep the changes to a minimum in this commit to help in review. The significant changes are:
1) Add the transformer base monad as an existential variable
EventF
2) A few moreunsafeCoerce
s for the continuation type conversions 3) lowering of monad computations into IO to facilitateforkIO
for new event creation. This requiresmonad-control
andlifted-base
.