importing Data.Digits

Hi All, This is my first 'post' not quite sure if I am doing it right. I have a question about the importing of modules that are available on the Hackage.Haskell site: http://hackage.haskell.org/package/digits if I write this in my wordpad and then load it to GCI i get the following error: chapter4.hs:1:1: error: Could not find module ‘Data.Digits’ Perhaps you meant Data.Bits (from base-4.12.0.0) Use -v to see a list of the files searched for. | 1 | import Data.Digits | ^^^^^^^^^^^^^^^^^^ However if I load Data.Char than it loads fine. What am I doing wrong? best,

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 http://hackage.haskell.org/package/digits-0.3.1/digits.cabal
You can find more information about how to start a package from scratch
here https://www.haskell.org/cabal/users-guide/developing-packages.html
On Mon, Nov 18, 2019 at 7:31 AM Alexander Chen
Hi All,
This is my first 'post' not quite sure if I am doing it right.
I have a question about the importing of modules that are available on the Hackage.Haskell site: http://hackage.haskell.org/package/digits
if I write this in my wordpad and then load it to GCI i get the following error:
chapter4.hs:1:1: error: Could not find module ‘Data.Digits’ Perhaps you meant Data.Bits (from base-4.12.0.0) Use -v to see a list of the files searched for. | 1 | import Data.Digits | ^^^^^^^^^^^^^^^^^^
However if I load Data.Char than it loads fine.
What am I doing wrong?
best, _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
participants (2)
-
Alexander Chen
-
David McBride