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

Add laws for MonadState and MonadReader #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Lysxia
Copy link

@Lysxia Lysxia commented Mar 3, 2019

See #5. These two classes are the easiest to think about.

@Lysxia
Copy link
Author

Lysxia commented Apr 21, 2019

Ping @RyanGlScott

@RyanGlScott
Copy link
Member

I really don't feel qualified to make a judgment about whether these should be the laws for these classes, which is why I haven't taken action. It might be worthwhile to bring up this topic on the Haskell libraries mailing list in order to garner a consensus (which I'd find convincing).

@Lysxia
Copy link
Author

Lysxia commented Apr 21, 2019

I see, thanks for your input! I will start a discussion on the mailing list.

@hanshoglund
Copy link

@Lysxia @RyanGlScott Any updates?

@Lysxia
Copy link
Author

Lysxia commented Oct 16, 2019

This is still WIP. On the mailing list it was suggested to investigate the matter more formally. So I started studying those laws in Coq: https://github.com/Lysxia/coq-mtl but I've been distracted by other things lately.

The situation, as I understand it, is that there is no formal definition of the mtl classes, and there is no objective criterion for what makes a law "good" or "bad". Through the formalization, the hope is to get a better understanding of how the laws relate to each other, and ideally to tease out some nice structure that could convincingly be considered the "essence" of mtl.

I'd be interested to hear about other people's motivations to have these laws documented.

@hanshoglund
Copy link

How about adopting the uncontroversial idea that reader, writer and state are monad homomorphisms as a starting point?

@Lysxia
Copy link
Author

Lysxia commented Oct 26, 2019

It's been a week since I reiterated my proposal: https://mail.haskell.org/pipermail/libraries/2019-October/030038.html

Is there anything more I can do to make progress to get this merged?

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.

3 participants