Version 3 (modified by refold, 6 years ago)

--

Interface API for regex-posix,pcre,parsec,tdfa,dfa.

URL: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/regex-base

Latest version: 0.93.1

Version shipped with GHC 6.10.2: 0.72.0.2

Chris Kuklewicz proposes:

As the writer and maintainer of the regex-(base|posix|compat) packages I would like suggest the following.

The Haskell platform should upgrade from the 0.72 version of regex-base to the 0.93.1 version. Similar updates to the latest releases of regex-posix and regex-compat would also be made. The old version has been kicking around too long, partly because I have not bothered to push updating the GHC bundle.

The regex-base update adds makeRegexM and makeRegexOptsM which allow for saner error handling when compiling regular expressions, they use "fail" instead of "error". It would be possible to switch to MonadError or perhaps the new exceptions, discussion of this is welcome.

The older version of regex-base has lazy overlapping instances of RegexContex which GHC allows and Hugs forbids, so the new version of regex-base has newtypes that force the user to be more explicit:

newtype AllSubmatches f b = AllSubmatches {getAllSubmatches :: (f b)}
newtype AllTextSubmatches f b = AllTextSubmatches {getAllTextSubmatches :: (f b)}
newtype AllMatches f b = AllMatches {getAllMatches :: (f b)}
newtype AllTextMatches f b = AllTextMatches {getAllTextMatches :: (f b) }

It would be possible to include most (or perhaps all) of the old instances, either as a sub-module or conditionally compiled, again discussion of this is welcome.

Duncan Coutts comments:

I think this is an excellent proposal for the second major release of the platform. In that release we should update several libs to the latest versions including the regex libs and QuickCheck. The first release however is sticking to the old "extra libs" that came with ghc-6.10.x.