[Haskell-cafe] Re: Why does HXT use Arrows?

Henning Thielemann lemming at henning-thielemann.de
Fri Dec 25 15:29:16 EST 2009


On Fri, 25 Dec 2009, Heinrich Apfelmus wrote:

> Which begets the question of whether HXT actually uses a way of taking
> input other than as function parameter. It appears to me that it doesn't.
>
>
> Put differently, I suspect that all of HXT can be rewritten to
>
>   mkCmt     :: String -> M XmlTree
>   mkElement :: QName -> (n -> M XmlTree) -> (n -> M XmlTree)
>             -> (n -> M XmlTree)
>
>   ArrowXML a => a b c   ~=~   b -> M c
>
> with  M a = [a]  being the list monad or some list augmented with IO.


I think this is the way, HXT was designed first. The functions are still 
available in hxt-filter.


More information about the Haskell-Cafe mailing list