Have a look at this recently uploaded package: http://hackage.haskell.org/package/first-class-patterns
Examine the "tryMatch" function in particular. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe