<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">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.</div></blockquote><div><br></div><div><br></div>From <a href="https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/IfaceFiles">https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/IfaceFiles</a> -- <br></div><div class="gmail_quote"><br></div><div class="gmail_quote">> This textual format is not particularly designed for machine parsing.  
Doing so might be possible, but if you <br></div><div class="gmail_quote">> want to read GHC interface files 
you are almost certainly better off using the <a class="gmail-wiki" href="https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/API">GHC API</a> to do so.</div><div class="gmail_quote"><br></div><div class="gmail_quote">That's the reason why I started investigating the GHC API.</div><div class="gmail_quote"><br></div><div class="gmail_quote">-- Saurabh.<br></div></div></div>