Data.Monoid
Iavor Diatchki
iavor.diatchki at gmail.com
Tue Oct 25 13:05:34 EDT 2005
Hello,
These instances overlap, which is not allowed in Haskell.
-Iavor
On 10/24/05, Marc A. Ziegert <coeus at gmx.de> wrote:
> Excerpt (revised):
> [code]
> class Sequence m where
> sequence :: [m a] -> m [a]
>
> instance Monad m => Sequence m where
> sequence = Control.Monad.sequence
>
> instance (Arrow f) => Sequence (f a) where
> sequence [] = pure (const [])
> sequence [f] = f >>> pure (:[])
> sequence (f:fr) = (f &&& sequence fr) >>> pure (uncurry (:))
More information about the Libraries
mailing list