Skip to content

Conversation

@basvandijk
Copy link
Contributor

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

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

from monad-control
@basvandijk
Copy link
Contributor Author

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.

@jepst
Copy link
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants