[Haskell-beginners] Re: Pure Regex.PCRE Possible? (PLEAC, Fix Style)

Volkan YAZICI yazicivo at ttmail.com
Wed Dec 23 08:02:12 EST 2009


On Sun, 20 Dec 2009, Chaddaï Fouché <chaddai.fouche at gmail.com> writes:
> On Sat, Dec 19, 2009 at 2:37 PM, Volkan YAZICI <yazicivo at ttmail.com> wrote:
>> 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-tutorial/

Am I missing something, or Text.Regex.Posix no more ships with Haskell,
particularly 6.12.1 version?


Regards.


More information about the Beginners mailing list