How to load & parse an HI (interface) file?

Saurabh Nanda saurabhnanda at gmail.com
Sun Dec 3 02:03:56 UTC 2017


GHC has a "--show-iface" option which pretty prints the ".hi" file. Not
> sure if it works for your use-case but it may be easier to parse the text
> displayed by this option.
>


>From https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/IfaceFiles
-- 

> This textual format is not particularly designed for machine parsing.
Doing so might be possible, but if you
> want to read GHC interface files you are almost certainly better off
using the GHC API
<https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/API> to do so.

That's the reason why I started investigating the GHC API.

-- Saurabh.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20171203/2433852b/attachment-0001.html>


More information about the ghc-devs mailing list