Haskell platform related proposal: update regex to latest versions
Chris Kuklewicz
haskell at list.mightyreason.com
Wed Jan 14 07:11:14 EST 2009
I have added this to the trac wiki at
http://trac.haskell.org/haskell-platform/wiki/Library/regex-base
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.
More information about the Libraries
mailing list