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 lists.
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 Haskell?
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to