Advice on replacing ghc-split

Tamar Christina lonetiger at
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,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list