
Gregory Crosswhite wrote:
Could you explain to me why HXT uses arrows? I have never been able to figure out what advantage this gives your library over monads. Since your arrows in practice implement ArrowApply, they are really just monads anyway, so it seems to me that using arrows instead of monads only serves to add complexity to the library without adding any benefit. Furthermore, by using arrows instead of monads people cannot use the many standard monad libraries out there, but have to instead write their own generalizations of them to arrows.
Is there some benefit that your library gets out of using arrows that I missed which makes these costs worth it?
I have the same question. It looks like the arrows in HXT are typed version of CFilter from Malcolm Wallace, Colin Runciman. Haskell and XML: Generic Combinators or Type-Based Translation? http://www.haskell.org/HaXml/icfp99.html but it appears to me that representing them as type Filter a b = a -> [b] allows the use of the list monad, which would highlight the similarity between list comprehensions and working with XML trees. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com