aesadde
aesadde

Reputation: 439

Parsing GHC Core in ghc-7.10

I am trying to parse some GHC Core to extract name information and other bits needed.

I am currently using the GHC API given that I haven't found other useful packages help with it.

I've looked through some packages like ghc-core, ghc-core-html and extcore but they seem slightly outdated and I haven't managed to use extcore with ghc-7.10.3.

I have also tried to look for up to date documentation on Core without luck. The best post I've come across is this one, but the discussion is slightly outdated (e.g. compiling the example from these slides, gives a different core dump using the latest ghc.

The question

Having said all this, do you guys know of any recent package that can help in parsing Core? Is there any new documentation regarding CORE manipulation?

Thanks!

Upvotes: 2

Views: 332

Answers (1)

dfeuer
dfeuer

Reputation: 48580

The external core feature was removed because it was buggy and a hassle to maintain and if people were using it they didn't speak up. So there is no longer any textual representation of Core intended for machine consumption. Only the internal (AST) representation is available. Of course, I'm sure you'd be welcome to revive the external representation if you want to maintain it.

Upvotes: 3

Related Questions