Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add instance MonadControlIO ProcessM #8

Open
wants to merge 6 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

basvandijk commented Oct 27, 2011

Hi Jeff,

This patch adds an instance for MonadControlIO for ProcessM

This enables users to lift 'control' operators into a process. Control operators are things like: alloca, mask, catch, forkIO, etc.

When you have this ability you can probably remove all your custom control operators: ptry, ptimeout, pbracket and pfinally. They can be replaced by simple one-liners in terms of functions from monad-control. (I may even make an additional patch for this if you want)

Regards,

Bas

basvandijk added some commits Oct 27, 2011

@basvandijk basvandijk Add instance MonadControlIO ProcessM
This enables users to lift 'control' operators into a process.
Control operators are things like: alloca, mask, catch, forkIO, etc.
39baf63
@basvandijk basvandijk Replaced ptry, pbracket and pfinally by corresponding functions from …
…Control.Exception.Control

from monad-control
426c595
Contributor

basvandijk commented Oct 27, 2011

As you see I went ahead and made a patch to replace ptry, pbracket and pfinally by functions from Control.Exception.Control from monad-control.

I also wanted to remove ptimeout but it turns out monad-control is not powerful enough to lift that type of control operation. So I'm planning to add a dedicated timeout function to monad-control.

Owner

jepst commented Oct 28, 2011

This is very interesting. I need some time to understand these changes before I commit them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment