<div dir="ltr">Also, "-ddump-hi" dumps the same information at compile time.<div><br></div><div>-harendra</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 3 December 2017 at 01:50, Harendra Kumar <span dir="ltr"><<a href="mailto:harendra.kumar@gmail.com" target="_blank">harendra.kumar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;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><br></div><div>-harendra</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 2 December 2017 at 21:29, Saurabh Nanda <span dir="ltr"><<a href="mailto:saurabhnanda@gmail.com" target="_blank">saurabhnanda@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div><div><div><div>(GHC newbie alert -- is this the right mailing list for these kind of questions?)<br><br></div>I"m writing some code to figure out all the instances of particular type-classes and after exploring a lot of options (hlint, haskell-src-exts, annotations, doctests, etc), I realized that the compiler had already figured it out and written it to disk for me! <br><br></div>More digging led me to <a href="https://www.stackage.org/haddock/lts-9.0/ghc-8.0.2/LoadIface.html#v:loadSrcInterface" target="_blank">https://www.stackage.org/haddo<wbr>ck/lts-9.0/ghc-8.0.2/LoadIface<wbr>.html#v:loadSrcInterface</a> after which I got stuck. How does one call this function? Specifically:<br><br></div>* What is SDoc and how to construct a reasonable value for this argument?<br></div>* IsBootInterface would mostly be False, right?<br></div>* What does `Maybe FastString` represent and how does one construct it?<br></div>* Finally how does one evaluate the resulting monadic action to get access to the underlying `ModIface`?<span class="m_4513476126843762808HOEnZb"><font color="#888888"><br><br></font></span></div><span class="m_4513476126843762808HOEnZb"><font color="#888888">-- Saurabh.<br><br></font></span></div>
<br></div></div>______________________________<wbr>_________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/ghc-devs</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>