[Haskell-cafe] name of this monadic combinator?

Mike Dillon mike at embody.org
Sun May 30 14:15:40 EDT 2010


begin Michael Snoyman quotation:
> http://hackage.haskell.org/packages/archive/base/4.2.0.1/doc/html/Control-Monad.html#v%3AliftM2
> 
> <file:///usr/share/doc/ghc6-doc/html/libraries/base-4.2.0.0/Control-Monad.html#v%3AliftM2>Strangely,
> Hayoo didn't turn this one up... anyone know why?

Hoogle finds it. I didn't think Hayoo was expected to do this sort of
abstract type signature search:

    http://haskell.org/hoogle/?hoogle=Monad+m+%3D%3E+%28a+-%3E+a+-%3E+a%29+-%3E+m+a+-%3E+m+a+-%3E+m+a

It comes up as the second hit on that search or the first hit on this
one:

    http://haskell.org/hoogle/?hoogle=Monad+m+%3D%3E+%28a+-%3E+b+-%3E+c%29+-%3E+m+a+-%3E+m+b+-%3E+m+c

That second search also shows zipWith in there; I never really thought
about zipWith being like liftM2 for the list Monad. I don't believe
that's actually true for the normal list Monad, but it should be true of
an alternate list Monad along the lines of the Functor and Applicative
instances for the ZipList newtype in Control.Applicative.

-md


More information about the Haskell-Cafe mailing list