[英]GHC could not find module but GHCi can
我之前已使用cabl install tidal
安装了tidal
软件包
当运行ghc Tidal.hs
:
Tidal.hs:4:1: error:
Could not find module ‘Sound.Tidal.Context’
There are files missing in the ‘tidal-0.9.6’ package,
try running 'ghc-pkg check'.
Locations searched:
Sound/Tidal/Context.hs
Sound/Tidal/Context.lhs
Sound/Tidal/Context.hsig
Sound/Tidal/Context.lhsig
/home/chris/.cabal/lib/x86_64-linux-ghc-8.2.2/tidal-0.9.6-HlQOMGZHP8JDJBhFqbDzA/Sound/Tidal/Context.hi
|
4 | import Sound.Tidal.Context
在最后一个文件路径中,该文件确实不存在,但是存在以.dyn_hi
结尾的.dyn_hi
。 因此,存在的文件的完整路径为: /home/chris/.cabal/lib/x86_64-linux-ghc-8.2.2/tidal-0.9.6-HlQOMGZHP8JDJBhFqbDzA/Sound/Tidal/Context.dyn_hi
错误原因可能是什么? 我可以在ghci
成功导入模块。
我阅读了以下内容: https : //ghc.haskell.org/trac/ghc/wiki/DynamicLinkingDebate
与运行它-dynamic
标记看起来修复: ghc -dynamic Tidal.hs
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.