sjshuck / hs-pcre2

Complete Haskell binding to PCRE2
Apache License 2.0
12 stars 2 forks source link

instantiate regex-base type classes #38

Open amigalemming opened 3 months ago

amigalemming commented 3 months ago

You list "No custom typeclasses" as feature. Is it because of reducing dependencies? I would like to have a way to easily switch between a Haskell-only and a low-level implementation, like regex-tfda and pcre2, respectively. I would also like to be able to switch between POSIX and Perl regular expressions. I only need a regex-base-compatible compile function makeRegexM and match function. Do you think this is difficult to implement? Actually, I do not even need a type class instance or a dependency on regex-base as long as the functions are type-compatible with the ones from regex-base. It would be sufficient to have a module like Text.Regex.Pcre2.Base that provides functions with names and types compatible to regex-base.