Advice on replacing ghc-split

Tamar Christina lonetiger at gmail.com
Thu Apr 9 18:14:26 UTC 2015


Hi All,


I have been working on creating a Haskell replacement for the perl script ghc-split.


The issue I need some advice on is that the perl script is 280 SLOC primarily because of the use of RegExpr.

The problem I have is that It seems i’m limited to only packages that are available already because GHC needs them (since it seems to compile using the in-place cabal and pkg list, am I correct here?).


So I see my options as follows:


Inline one of the regexp libraries, e.g. pcre-light


Create my own string matching functions (possibly a simple DFA and encode the rexexpr into that)


Use parsec (which I think is available as part of the ghc build no?)



Does anyone have an idea on what the best approach would be?


The regexpr don’t seem to use any perl extensions, so normal posix regex would be fine, I thought Base contained a regexp component. But it seems that’s now a separate library?


Kind Regards,

Tamar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20150409/e9a26e23/attachment.html>


More information about the ghc-devs mailing list