[Haskell-cafe] Re: Monad instance for partially applied type
constructor?
Alexander Solla
ajs at 2piix.com
Thu Sep 30 00:28:27 EDT 2010
On 09/29/2010 09:13 PM, Alexander Solla wrote:
> On 09/29/2010 02:15 PM, DavidA wrote:
>>> instance Monad (\v -> Vect k (Monomial v))
>>> >
>> Yes, that is exactly what I am trying to say. And since I'm not
>> allowed to say
>> it like that, I was trying to say it using a type synonym
>> parameterised over v
>> instead.
>
> Why not:
>
> instance Monad ((->) Vect k (Monomial v))
Sorry, I guess this is a bit off. I don't think you "really" want a
monad. I think you want something like the dual to the reader monad
(i.e, a comonad)
More information about the Haskell-Cafe
mailing list