thumphries / hgrep

Search Haskell source code from the command line
BSD 3-Clause "New" or "Revised" License
76 stars 15 forks source link

Investigate CPP alternatives #39

Open thumphries opened 7 years ago

thumphries commented 7 years ago

Currently we're letting exactprint perform CPP expansion. It does this by reading a settings file at runtime from a hardcoded location deep inside your machine's GHC installation, then shelling out to CPP. If the file isn't there, it throws an exception. This isn't great, because it makes it hard to publish portable binaries from Travis etc.

We have a couple of alternatives:

I lean towards cpphs, which we can later populate on the fly with cabal macros.

It would be worthwhile first confirming that exactprint is properly portable once CPP is disabled!

This is something I'd rather do once we have benchmarks in place, because something like cpphs may come with a significant cost. It'd be bearable given we're pretty slow already, but would like to see the impact before switching over.