<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello!<div class=""><br class=""></div><div class="">I’m trying to use GHC as a library. And my goal is to be able to gather information about where each function or data type came from. I’ve started by simply calling `getNamesInScope` function and observing its result. Here is my code:</div><div class=""><br class=""></div><div class="">* Main.hs: <a href="https://lpaste.net/9026688686753841152" class="">https://lpaste.net/9026688686753841152</a></div><div class=""><br class=""></div><div class="">And here is the code for my test modules:</div><div class=""><br class=""></div><div class="">* test/X.hs: <a href="https://lpaste.net/6844657232357883904" class="">https://lpaste.net/6844657232357883904</a></div><div class="">* test/Y.hs: <a href="https://lpaste.net/8673289058127970304" class="">https://lpaste.net/8673289058127970304</a></div><div class=""><br class=""></div><div class="">Unfortunately, my implementation doesn't work since I’m not very familiar with GHC API. </div><div class="">And I see the following errors after executing my `Main.hs` file (I’m using ghc-8.2.2):</div><div class=""><br class=""></div><div class="">* error messages: <a href="https://lpaste.net/3316737208131518464" class="">https://lpaste.net/3316737208131518464</a></div><div class=""><br class=""></div><div class="">Could you please point me to places or parts of GHC API or some documentation about module dependencies and how to make ghc see imports of other modules? I can’t find simple and small enough usage example of this part of the library.</div><div class=""><br class=""></div><div class="">Thanks in advance,</div><div class="">Dmitrii Kovanikov</div></body></html>