[Haskell-cafe] Combining applicative with arrows?

Ross Paterson ross at soi.city.ac.uk
Fri Sep 10 05:35:26 EDT 2010

On Fri, Sep 10, 2010 at 10:34:04AM +0200, Nils Schweinsberg wrote:
> I just wondered if you can define Applicative instances for arrows?
> Basicly what I thought of is:
> I have a type for my arrow which is "CollectA" (using HXT here):
>     type CollectA a = SomeArrow XmlTree a

If you do

  import Control.Applicative

  type CollectA = WrappedArrow SomeArrow XmlTree

then CollectA will be an instance of Applicative.

More information about the Haskell-Cafe mailing list