Open robwithhair opened 4 years ago
@robwithhair There's https://github.com/sjshuck/hs-pcre2.git. The actual PCRE feature sets are similar between 1 and 2, only differing in edge cases. Do you have a specific need for PCRE2? (Disclaimer: I am the author of that package.)
Hi! :wave:
I package pcre2 for Arch Linux. Since pcre is unmaintained we are working on moving to pcre2. @sjshuck from what I understand after reading your comment, some (but probably not all) projects in the haskell ecosystem could start relying on your package instead without huge switching costs?
@dvzrv
There is an outstanding low-level bug that caused segfaults in the Ormolu project and required the authors to switch away from the library. While it's been an ambition of mine to eventually return to hs-pcre2, life has taken me in other directions in the past few years.
This does make me want to return to it; IMHO it's a good library, it just needs some attention. I can't give a time frame right now but I did want to be up front about the state of hs-pcre2.
Is it difficult to enable pcre2 as backend for this package? sjshuck/hs-pcre2.git is interesting with its compile-time checks, but it misses regex-base
compatibility.
@amigalemming ultimately I ended up writing my own package as needed subset of pcre2 capabilities. It is only as complete as I needed for my personal project needs and I was much worse at Haskell back then so very beginner stuff, but you can find it here hpcre2. I found the foreign function interface in Haskell a lot easier than I was concerned about. Ultimately it was not as difficult as I thought to follow the pcre2 docs and code against them as a C library interface. I'm sure if I was writing it now I would have done very differently now I'm more experienced in Haskell but I had a problem to solve and got it done.
I did try to get this added to hackage at some point but it was too time consuming to do. Now it is largely present as a reference for if others need to do the same thing.
Does this package support PCRE2? Reading the code I can’t see any reference to PCRE2. Do you have any knowledge of another Haskell package with pcre2 support?