<div dir="ltr">you will need to edit the associated cabal file</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jan 2, 2019 at 10:49 PM Anton Xue <<a href="mailto:antonxue1572@gmail.com">antonxue1572@gmail.com</a>> wrote:<br></div><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"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hey all,<br><br>I want to make modifications to a custom version of ghc/Main.hs that depends on packages not natively shipped with GHC 8.2.2.</div><div dir="ltr"><br></div><div dir="ltr">In short, I want to be able to write "import Network" (<a href="http://hackage.haskell.org/package/network-2.8.0.0" target="_blank">http://hackage.haskell.org/package/network-2.8.0.0</a>) in ghc/Main.hs and then build GHC from source. However, I am running into some problems, and here is what I have attempted based on the Building/Modifying page (<a href="https://ghc.haskell.org/trac/ghc/wiki/Building/Modifying" target="_blank">https://ghc.haskell.org/trac/ghc/wiki/Building/Modifying</a>):</div><div dir="ltr"><br></div><div>1. I downloaded a copy of the network package and placed it in libraries/network.</div><div>2. I added an entry to the packages file for library/network, and used dashes for all the other entries.</div><div>3. perl boot</div><div>4. I modified <a href="http://ghc.mk" target="_blank">ghc.mk</a> and placed libraries/network as the first PACKAGES_STAGE1 append right before ghc-prim</div><div>5. make -j5</div><div dir="ltr"><div><br></div><div>The build then fails complaining that:</div><div><br></div><div><div>ghc/Main.hs:77:8: error:</div><div> Could not find module ‘Network’</div><div> Use -v to see a list of the files searched for.</div><div> |</div><div>77 | import Network</div></div><div><br></div><div><br></div><div>A similar problem also appears when I replace "import Network" with "import System.Console.Haskeline", which is strange considering that haskeline was shipped with GHC 8.2.2. However, other imports such as "import System.CPUTime", which was defined in base, do not raise this error. Otherwise GHC builds fine with no errors.</div><div><br></div><div>I am wondering what I should do to solve this issue.</div><div><br></div><div><br></div><div>Thank you,</div><div><br></div><div>Anton</div><div><br></div><div><br></div></div></div></div></div></div></div></div>
_______________________________________________<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-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div>