Import Haskell Modules

I am new to Haskell. Why, when I try to use Daysfrom Data.Time, I get this error:

Could not find module `Data.Time':
      It is a member of the hidden package `time-1.1.4'.
      Perhaps you need to add `time' to the build-depends in your .cabal file.

I import Data.List and Control.Monad and it does not give me this error message, but the code import Data.Timedoes.

What am I missing?

Thanks for the help!

EDIT: I get a similar error message when I use: import Directory

Thanks guys, your answers made me on the go!

+5
source share
2 answers

Launch Leksah with this project, open the package menu and select "edit package." Now select the “dependencies” and add the dependency you need (in your case time). You can also choose a version.

PS: "". ( , ...).

+10

.cabal, ProjectName.cabal, "build-depends:" "" . Leksah, .

EDIT: " , X"

Data.Time time, , , . Directory. Data.List Control.Monad, base, , , .

, , , base . .

+4

All Articles