[Haskell-cafe] trivial function application question

Yitzchak Gale gale at sefer.org
Fri Jan 5 09:23:19 EST 2007

tphyahoo wrote:
>> There are various haskell regex libraries out there,

Jules Bean wrote:
> But that's such a perler attitude. When all you have is a regex,
> everything looks like a s///!

Not always, sometimes it is right to use regexes in Haskell

If there are more than a few patterns to match in the same
string, or if the patterns are more than a few characters long,
then the simple approach will start becoming expensive.

You need to use a more sophisticated algorithm - building
up trees of potential matches, backtracking in some cases,
etc. Why re-invent the wheel? Just use the regex library,
where that is already done.


More information about the Haskell-Cafe mailing list