[Haskell-cafe] predicates in XML toolboxes

Henning Thielemann lemming at henning-thielemann.de
Tue Apr 12 04:21:05 EDT 2005

The XML toolboxes HaXml, HXML and the XML toolbox uses one function type 
(called filter) for different purposes.

The functions of types

predicates                   a -> Bool
selectors, transformators    a -> a
list-valued functions        a -> [a]

are all implemented with the one type (a -> [a]). In this design 
predicates don't return False or True, but an empty list or a one-element 
list containing the input value. Transformators return single element 
  In my opinion this means a significant loss of type safety and quality of 
documentation. Are there more type safe XML/HTML processor libraries in 

More information about the Haskell-Cafe mailing list