Text.Regex.Posix exposes too little

Peter Simons simons at cryp.to
Fri Feb 11 16:24:02 EST 2005


I was wondering why Text.Regex.Posix does not expose the Ptr
interface to the regular expression library? Is there a
deeper reason for that?

I am also worried about the fact that the module uses
finalizers to free-up unused expressions -- rather than
providing a bracket-style

  withRegex :: String -> Int -> (Regex -> IO a) -> IO a


Last but not least I see that the regex flags are
represented as an 'Int'. I don't feel strongly about this,
but IMHO a

  data RegexFlag = IgnoreCase
                 | Newline
                 | ...

data type with an appropriate declaration for Enum would be
nicer for this purpose.

Unless there is violent opposition, I'd volunteer to make
those changes, because as it happens I need them anyway. ;-)


More information about the Libraries mailing list