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

Lift instances of MonadReader, etc. #23

Closed
treeowl opened this issue Aug 25, 2021 · 2 comments · Fixed by #24
Closed

Lift instances of MonadReader, etc. #23

treeowl opened this issue Aug 25, 2021 · 2 comments · Fixed by #24

Comments

@treeowl
Copy link
Contributor

treeowl commented Aug 25, 2021

LogicT lifts MonadReader and I think MonadState. The implementations will look quite different, but ListT should be able to do the same.

@treeowl
Copy link
Contributor Author

treeowl commented Aug 25, 2021

I'm working on proving that the obvious MonadReader instance obeys the (proposed) laws. Hope I can get there.

@treeowl
Copy link
Contributor Author

treeowl commented Aug 25, 2021

It's really annoying that local is in MonadReader rather than a subclass, and similarly for pass and whatever in Writer. The main things we want are ask and tell, and those are trivial!

treeowl added a commit to treeowl/list-t that referenced this issue Aug 26, 2021
* I've pretty well convinced myself that this instance obeys the `MonadReader`
  laws
  [proposed by Heinrich Apfelmus](haskell/mtl#5 (comment))
  and the ones
  [proposed by Li-yao Xia](haskell/mtl#5 (comment)),
  so I think it should be added.

* The `MonadState` instance is trivial.

Closes nikita-volkov#23.
treeowl added a commit to treeowl/list-t that referenced this issue Aug 26, 2021
* I've pretty well convinced myself that this instance obeys the `MonadReader`
  laws
  [proposed by Heinrich Apfelmus](haskell/mtl#5 (comment))
  and the ones
  [proposed by Li-yao Xia](haskell/mtl#5 (comment)),
  so I think it should be added.

* The `MonadState` instance is trivial.

Closes nikita-volkov#23.
treeowl added a commit to treeowl/list-t that referenced this issue Aug 26, 2021
* I've pretty well convinced myself that this instance obeys the `MonadReader`
  laws
  [proposed by Heinrich Apfelmus](haskell/mtl#5 (comment))
  and the ones
  [proposed by Li-yao Xia](haskell/mtl#5 (comment)),
  so I think it should be added.

* The `MonadState` instance is trivial.

Closes nikita-volkov#23.
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 a pull request may close this issue.

1 participant