 
            On Sat, Dec 19, 2009 at 2:37 PM, Volkan YAZICI 
However, if I'm not mistaken, above functions _should_ be absolutely pure. Is it possible to encapsulate impure PCRE functions into their pure equivalents?
BTW, why are PCRE functions impure?
Mainly because they _are_ the core that _is_ encapsulated as you suggested : regex-pcre as many other regex library, provides the same basic mostly pure interface which is in regex-base. That interface comes with many specific pure function (matchText, matchOnce, matchAll and so on, as well as makeRegex and others) and some "magic" operators like =~ which decides what kind of matching you want to do depending on the type of the result. See this tutorial for some example of usage : http://www.serpentine.com/blog/2007/02/27/a-haskell-regular-expression-tutor... -- Jedaï