简体   繁体   English

在ghc-7.10中解析GHC核心

[英]Parsing GHC Core in ghc-7.10

I am trying to parse some GHC Core to extract name information and other bits needed. 我正在尝试解析一些GHC Core,以提取名称信息和其他所需的位。

I am currently using the GHC API given that I haven't found other useful packages help with it. 鉴于我还没有找到其他有用的软件包来帮助我,因此我目前正在使用GHC API。

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. 我查看了一些软件包,例如ghc-coreghc-core-htmlextcore但它们似乎有些过时了,我还没有设法在ghc-7.10.3中使用extcore

I have also tried to look for up to date documentation on Core without luck. 我也曾尝试在Core上寻找最新的文档,但没有运气。 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. 我遇到的最好的帖子是这篇文章 ,但是讨论有点过时了(例如,从这些幻灯片中编译示例,使用最新的ghc给出了不同的核心转储)。

The question 问题

Having said all this, do you guys know of any recent package that can help in parsing Core? 说了这么多,你们是否知道最近有任何可以帮助解析Core的软件包? Is there any new documentation regarding CORE manipulation? 是否有关于CORE操作的新文档?

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. 因此,不再有任何用于机器消耗的Core文本表示形式。 Only the internal (AST) representation is available. 仅内部(AST)表示可用。 Of course, I'm sure you'd be welcome to revive the external representation if you want to maintain it. 当然,如果您要维护外部代表,我敢肯定您会受到鼓舞。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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