AccumT is a regular transformer and should have a regular MonadAccum instance.#141
AccumT is a regular transformer and should have a regular MonadAccum instance.#141jumper149 wants to merge 1 commit intohaskell:masterfrom
AccumT is a regular transformer and should have a regular MonadAccum instance.#141Conversation
c21c548 to
b1e36c4
Compare
|
Moving this here just so that it doesn't get lost (from #140):
My motivation was instance (Monoid w, Monad m) => MonadWriter (WriterT w m)I also feel like this is the way, that all transformers instances work (except for So if you would argue to keep Well I think the way that |
There is no reason to restrict this instance any further.
b1e36c4 to
7172d34
Compare
Sorry, I'm confused as to why you feel this is "the way"? What way? Are you making the argument that it's always the case that If this is not the case and you've found a way to make it work, do you mind presenting your work and showing us that the laws pass? |
I did the work: https://felixspringer.xyz/homepage/blog/accumtsMonadaccumInstance
I didn't check this in particular, but considering that I just proved it for any base monad your finding cannot be true (unless I made a mistake of course, so please thoroughly check it). |
|
This looks like a fine change to me. I'm also puzzled why |
|
@jumper149 I believe i was looking at the PR last night and proved something else for something entirely unrelated to the PR. I checked again and yes, your proof is fine, thanks for providing it. It seems like this would be fine! |
|
Any updates on this? I wonder why is this not merged still after 2 years |
|
I believe this could be merged as-is, right? |
|
It looks good and is redundant with #168 @turion. Thanks for the PR @jumper149 and sorry about the delay. |
|
No worries, it's nice to see some progress :) Thanks for maintaining |
I think this was accidentaly copy-pasted, see #140 .
I don't see any problem with doing it this way.
Maybe you can spot anything?