Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace pcre-light by regexp-tdfa. #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Toxaris
Copy link

@Toxaris Toxaris commented May 5, 2013

The pcre-light package is a binding to a C library, so it is non-trivial to compile on Windows. I think this is the main reason for the "Unix systems only, currently." warning in the package description. In this pull request, I replaced pcre-light with regexp-tdfa (which is pure Haskell), and it compiles fine and seems to work.

Open Questions:

  • I ignore the ungreedy options. Are they important?
  • regexp-tdfa implements Posix regexps, but pcre-light implements Perl-style regexps. Is the difference important for ghc-core?
  • Is regexp-tdfa a good choice? It would be easy to use any other library that implements the common regexp API.

@erikd
Copy link

erikd commented Jan 25, 2014

ghc-core doesn't compile with current GHC git HEAD because pcre-light doesn't compile.

@Toxaris
Copy link
Author

Toxaris commented Jan 26, 2014

I see. What's the easily portable regular expression library of choice, then?

@erikd
Copy link

erikd commented Jan 26, 2014

'regex-tdfa' or any of the others should be fine.

@Toxaris
Copy link
Author

Toxaris commented Jan 28, 2014

Oh, looks like I didn't see. So this patch is good for two reasons: works on Windows, works with ghc head?

@erikd
Copy link

erikd commented Jan 28, 2014

Unfortunately regex-tdfa is broken with ghc HEAD. I've emailed the author.

I still think regex-tdfa is a good choice for this project.

@Toxaris
Copy link
Author

Toxaris commented Jan 30, 2014

Roman Cheplyaka forked and repaired regex-tdfa. See discussion and fork.

@erikd
Copy link

erikd commented Jan 30, 2014

Gah! That's messy!

Roman has created a new package, same as the old package with a minor fix, but that package is only a temporary solution until he fully takes over the old package at which point the new/temporary package dies.

I can understand why he did it, but ....... gah!

@erikd
Copy link

erikd commented Feb 2, 2014

Upstream regex-tdfa has been fixed for the pending ghc-7.8 release so ther eis no reason to use regex-tdfa-rc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants