[Haskell-cafe] Interesting new user perspective
Jonathan Cast
jonathanccast at fastmail.fm
Fri Oct 10 17:46:36 EDT 2008
On Fri, 2008-10-10 at 22:40 +0100, Andrew Coppin wrote:
> Iain Barnett wrote:
> > On 10 Oct 2008, at 9:50 pm, Don Stewart wrote:
> >> Haskell makes
> >> constructing true parsers just as easy,
> >>
> >
> > You're not speaking for me there! :) I really like regex. It's a
> > domain specific functional language, so why rewrite the wheel?
>
> Because it's a wheel that looks like the wrong end of a dog? :-}
identifier = lexeme $ match "[[:lower:]_][[:alphanum:]_]*"
(pretending match :: String -> Parser String is a regex engine).
vs.
identified = lexeme $ do
c <- satisfy isLower <|> satisfy (=='_')
s <- many $ satisfy isAlphaNum <|> satisfy (=='_')
return (c:s)
I'm not sure I follow you here...
jcc
More information about the Haskell-Cafe
mailing list