Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DPP-57] Provide versions of handle{Cast|Call}_ that work in the Process monad #123

Open
qnikst opened this issue Jun 17, 2015 · 0 comments
Labels

Comments

@qnikst
Copy link
Contributor

qnikst commented Jun 17, 2015

[Imported from JIRA. Reported by Tim Watson [Administrator] @hyperthunk) as DPP-57 on 2013-01-14 22:12:01]
Consider these two cast handlers:

handleCastIf_ (\(c :: String, _ :: Delay) -> c == "timeout")
                            (\("timeout", Delay d) -> timeoutAfter_ d),
handleCast    (\s' ("ping", pid :: ProcessId) ->
                                 send pid "pong" >> continue s')

There's no great reason why we shouldn't be able to skip the state in the latter as we do with the former, but the continue_ function returns (s -> Process (ProcessAction s)) which means it can't be used in monadic code like this.

@qnikst qnikst added the task label Jun 17, 2015
@qnikst qnikst changed the title Provide versions of handle{Cast|Call}_ that work in the Process monad [DPP-57] Provide versions of handle{Cast|Call}_ that work in the Process monad Jun 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant