Hi! On Dec 29, 2007 12:13 AM, Evan Laforge <[EMAIL PROTECTED]> wrote: > Maybe you could use view patterns? > > foo (regex "(.*);(.*);(.*)") -> [c1, c2, c3] = ...
Oh. Beautiful. :-) > Parser combinators basically provide generalized regexes, and they all > take lists of arbitrary tokens rather than just Chars. I've written a > simple combinator library before that dispenses with all the monadic > goodness in favor of a group combinator and returning [Either [tok] > [tok]], which sort of gives parsers a simpler regexy flavor (Left is > "out of group chunk" and Right is "in group chunk"). > > foo (match (group any `sepBy` char ';') -> [c1, c2, c3]) = ... Ah. Is this accessible somewhere? Mitar _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe