Repository navigation
add (existing mtl typeclass) instances for SelectT - #81
Conversation
|
You've added |
91c98ee to
c5f29d2
Compare
|
Would like a review from @RyanGlScott @emilypi (and @turion maybe?) |
|
Are you going to add more instances? Or documentation why other typical instances won't work? |
|
No, I am not going to add more instances, since I think they should not exist. I am not sure where any documentation pointing to the lack of instances should exist, if at all. To my understanding, SelectT is equivalent in representation and implementation to ContT but not intended to be used as a Continuation monad, i.e. its type signifies a different intention, and it is its own beast. So, while we could give it a MonadCont instance, this seems to go against its spirit, in the same vein that giving AccumT an instance of |
Yes, that I absolutely agree with.
And that's my actual question. Sorry for being somewhat imprecise, let me specify: Is there going to be an instance |
|
@turion i don't know if |
|
@RyanGlScott @emilypi could you take a look at this when you have the time? |
|
@chessai Why wouldn't |
|
I agree that it wouldn't hurt to add a comment somewhere explaining why |
|
i agree, but i think that it should come in a separate PR, the one that actuallys adds Control.Monad.Select. Otherwise, the explanation feels a little dangly. |
|
I suppose the documentation could go in the .Class modules instead. What are your thoughts? |
|
Maybe the statement "is not a functor on the category of monads" could simply be explained with a type signature, such as "i.e. there is no function
Inside |
|
I agree that the documentation for Even if the Haddocks in |
One argument in that direction is that we would expect the instance of such a class, if it would exist, to be in |
|
@chessai I suggest we move doc changes to a separate PR. It sounds like like we all have thoughts on this, and it shouldn't block the instances. |

Not many instances for this. Should it have any more?
Should follow the merge of #80