隐藏包 binary-0.7.5.0?
Hidden package binary-0.7.5.0?
我收到这个错误:
Could not find module ‘Data.Binary’
It is a member of the hidden package ‘binary-0.7.5.0@binar_IvYoLp9H6Xy3zEH13MmZwd’.
当我使用 GHCi 版本 7.10.2 在我的堆栈项目中导入 Data.Binary
时。
奇怪的是,如果我通过 stack exec ghci
执行 GHCi,这不会出现,而且我无法通过堆栈安装更新版本的 binary
包,看起来:
D:\p>stack install binary
Setting codepage to UTF-8 (65001) to ensure correct output from GHC
NOTE: the install command is functionally equivalent to 'build --copy-bins'
D:\p>stack install binary-0.7.6.1
Setting codepage to UTF-8 (65001) to ensure correct output from GHC
NOTE: the install command is functionally equivalent to 'build --copy-bins'
Error parsing targets: Specified target version 0.7.6.1 for package binary does not match snapshot version 0.7.5.0
D:\p>stack install binary-0.7.5.0
Setting codepage to UTF-8 (65001) to ensure correct output from GHC
NOTE: the install command is functionally equivalent to 'build --copy-bins'
你会如何解决这个问题?
将 binary
依赖项添加到您的 cabal
文件。
build-depends: base >= 4.7 && < 5
, binary >= 0.7.5
当您使用 stack install
时,您正在安装某些库或可执行文件,但不是作为依赖项(例如,像 yesod
这样的实用程序或您仅在 ghci
中使用的某些库.. .).
我收到这个错误:
Could not find module ‘Data.Binary’
It is a member of the hidden package ‘binary-0.7.5.0@binar_IvYoLp9H6Xy3zEH13MmZwd’.
当我使用 GHCi 版本 7.10.2 在我的堆栈项目中导入 Data.Binary
时。
奇怪的是,如果我通过 stack exec ghci
执行 GHCi,这不会出现,而且我无法通过堆栈安装更新版本的 binary
包,看起来:
D:\p>stack install binary
Setting codepage to UTF-8 (65001) to ensure correct output from GHC
NOTE: the install command is functionally equivalent to 'build --copy-bins'
D:\p>stack install binary-0.7.6.1
Setting codepage to UTF-8 (65001) to ensure correct output from GHC
NOTE: the install command is functionally equivalent to 'build --copy-bins'
Error parsing targets: Specified target version 0.7.6.1 for package binary does not match snapshot version 0.7.5.0
D:\p>stack install binary-0.7.5.0
Setting codepage to UTF-8 (65001) to ensure correct output from GHC
NOTE: the install command is functionally equivalent to 'build --copy-bins'
你会如何解决这个问题?
将 binary
依赖项添加到您的 cabal
文件。
build-depends: base >= 4.7 && < 5
, binary >= 0.7.5
当您使用 stack install
时,您正在安装某些库或可执行文件,但不是作为依赖项(例如,像 yesod
这样的实用程序或您仅在 ghci
中使用的某些库.. .).