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)
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe