[Haskell-cafe] Re: Who is afraid of arrows, was Re: ANNOUNCE: Haskell XML Toolbox Version 9.0.0

Nikitiskiy Dmitriy nick at bel.ru
Fri Oct 15 13:33:33 EDT 2010

15.10.2010 15:03, Malcolm Wallace пишет:
> On 15 Oct 2010, at 10:44, Heinrich Apfelmus wrote:
>> Personally, I would be much happier with the slogan "HXT = XML
>> transformations with filters". Browsing through Manuel's thesis, I
>> discover that your combinators are quite slick ( >>> , choiceA , when,
>> guards ), it's just that they are a very specialized subset of the
>> general arrow combinators. I think that dropping the arrows and
>> rebranding your nice set of combinators as "filter combinators" would
>> greatly improve the library.
> But then, HXT's filter combinators would return to being rather like
> HaXml's filter combinators, where the concept was first introduced.
> Personally, I'm very happy that customers avoid HXT (due to the
> complexity of the arrow interface), because that means more customers
> for HaXml... :-)
> Regards,
> Malcolm
> P.S. Coming soon in the next release of HaXml: full support for xmlns
> namespaces, and an XSDToHaskell translator.
Sorry, for offtopic.

But how in HaXml will look equivalent this filter:

data MyAttr = MyAttr String String

getAttrs = deep (isElem >>> hasName "SomeTag") >>>
proc x -> do
aname <- getAttrValue "Name" -< x
atype <- getAttrValue "Type" -< x
returnA -< MyAttr aname atype

I personally have swithed to HaXml because they have less memory
consumption, but for extracting attributes from nodes haven't found
standart method.


More information about the Haskell-Cafe mailing list