<div dir="ltr"><div>This particular module comes from a separate package. By default all modules you use happen to be in the base package, which ships with ghc. To use other libraries you must make a proper project which tells ghc which libraries you are using. For example, the digits package uses this cabal file at <a href="http://hackage.haskell.org/package/digits-0.3.1/digits.cabal">http://hackage.haskell.org/package/digits-0.3.1/digits.cabal</a></div><div><br></div><div>You can find more information about how to start a package from scratch here <a href="https://www.haskell.org/cabal/users-guide/developing-packages.html">https://www.haskell.org/cabal/users-guide/developing-packages.html</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 18, 2019 at 7:31 AM Alexander Chen <<a href="mailto:alexander@chenjia.nl">alexander@chenjia.nl</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 style="font-family:Arial;font-size:13px">Hi All,<div><br></div><div>This is my first 'post' not quite sure if I am doing it right.</div><div><br></div><div>I have a question about the importing of modules that are available on the Hackage.Haskell site:</div><div><a href="http://hackage.haskell.org/package/digits" target="_blank">http://hackage.haskell.org/package/digits</a></div><div><br></div><div>if I write this in my wordpad and then load it to GCI i get the following error:</div><div><br></div><div><br></div><div><div>chapter4.hs:1:1: error:</div><div> Could not find module ‘Data.Digits’</div><div> Perhaps you meant Data.Bits (from base-4.12.0.0)</div><div> Use -v to see a list of the files searched for.</div><div> |</div><div>1 | import Data.Digits | ^^^^^^^^^^^^^^^^^^</div></div><div><br><div><div style="font-family:Arial;font-size:13px"><br></div></div></div><div style="font-family:Arial;font-size:13px">However if I load Data.Char than it loads fine.</div><div style="font-family:Arial;font-size:13px"><br></div><div style="font-family:Arial;font-size:13px">What am I doing wrong?</div><div style="font-family:Arial;font-size:13px"><br></div><div style="font-family:Arial;font-size:13px">best,</div></div>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div>