简体   繁体   中英

Why can't Haskell find an installed module?

I wrote the following program:

import Yesod

main = putStrLn "test"

but when I run the program I get the following error

C:\\myprograms>runhaskell test0

test0.hs:1:8: Could not find module `Yesod' Use -v to see a list of the files searched for.

But I have installed Yesod! Does anyone know what is happening?

As the comments describe, the first step is to list your packages. The second is to check the versions to see if they correspond. The third is to see if the package you expect to provide a module is actually exposed rather than hidden.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM