简体   繁体   中英

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 (eg 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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM