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

BackT in MFlow is not a monad #61

Closed
ninegua opened this issue May 2, 2015 · 2 comments
Closed

BackT in MFlow is not a monad #61

ninegua opened this issue May 2, 2015 · 2 comments

Comments

@ninegua
Copy link

ninegua commented May 2, 2015

Not sure if this has been brought up before, but I was reading the paper MFlow, a contiuation-based web
framework without continuations
In The Monad Reader Issue 23, and noticed that the BackT type violates associativity law of monads, because (a >> b) >> c behaves differently than a >> (b >> c). You can see my code that demonstrates this issue.

Not sure how much the real MFlow implementation differs from the paper as I have not used it nor read its source.

@agocorona
Copy link
Owner

Hi Paul.
Yes I has been mentioned, but thanks a lot for mentioning it.

This produces effects that precludes the use of the backT monad for other
purposes. in MFlow it is used internally for navigation and perform
backtracking well in combination with REST path navigation.

But I found another way to do backtracking that is more general and
flexible. It Will be at the new version of MFlow. hat mechanism is
described in this article:

https://www.fpcomplete.com/user/agocorona/the-hardworking-programmer-ii-practical-backtracking-to-undo-actions

(At this moment this mechanism is under research, since it is quite unusual
and is an unexplored territory. I found some problems with the associative
law that are now fixed in my local PC)

How did you know about MFlow?

2015-05-02 9:32 GMT+02:00 Paul Liu notifications@github.com:

Not sure if this has been brought up before, but I was reading the paper MFlow,
a contiuation-based web
framework without continuations
https://themonadreader.files.wordpress.com/2014/04/mflow.pdf In The
Monad Reader Issue 23
https://themonadreader.wordpress.com/2014/04/23/issue-23/, and noticed
that the BackT type violates associativity law of monads, because (a >>
b) >> c behaves differently than a >> (b >> c). You can see my code that demonstrates
this issue https://gist.github.com/ninegua/97833cb4f82451f6c3db.

Not sure how much the real MFlow implementation differs from the paper
as I have not used it nor read its source.


Reply to this email directly or view it on GitHub
#61.

Alberto.

@ninegua
Copy link
Author

ninegua commented May 4, 2015

Thanks for the update. I joined a Chinese reader group that studies The Monad Reader articles in weekly or bi-weekly online meetups. We discussed the MFlow paper last week, and that was how I came to find out more about it. Fascinating read, and keep up the good work!

@ninegua ninegua closed this as completed May 4, 2015
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

No branches or pull requests

2 participants