[Haskell-cafe] predicates in XML toolboxes

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Tue Apr 12 08:48:23 EDT 2005


Henning Thielemann <lemming at henning-thielemann.de> writes:

> >> predicates                   a -> Bool
> >> selectors, transformators    a -> a
> >> list-valued functions        a -> [a]
> 
> What about providing combinators for the most common cases and provide 
> lifting functions for the uncommon cases, such as
> 
> liftPred :: (a -> Bool) -> (a -> [a])
> liftPred p x = if p x then [x] else []
> 
> liftTrans :: (a -> b) -> (a -> [b])
> liftTrans f x = [f x]

Looks good.  If you want to come up with a concrete design for an fuller
set of alternative combinators, I'd be happy to include it into HaXml as
a further choice of facility.

Regards,
    Malcolm


More information about the Haskell-Cafe mailing list