我试图在我的系统上运行hafka。而对于相同的元素类型,Data.ByteString.Internal.ByteString
,由于版本号不匹配,haskell会引发错误。字节串 - 程序包版本号不匹配
Couldn't match expected type ‘bytestring-0.10.4.0:Data.ByteString.Internal.ByteString’
with actual type ‘B.ByteString’
NB: ‘bytestring-0.10.4.0:Data.ByteString.Internal.ByteString’
is defined in ‘Data.ByteString.Internal’
in package ‘bytestring-0.10.4.0’
‘B.ByteString’
is defined in ‘Data.ByteString.Internal’
in package ‘bytestring-0.10.6.0’
在我的系统,当我运行ghc-pkg list | grep bytestring
,它表明, bytestring-0.10.4.0
。
ghc
未使用版本为bytestring-0.14.0
的软件包。 Haskell在哪里得到实际的版本 - bytestring-0.10.6.0
?
我还没有看到任何语言检查跨库版本的类型安全。为什么Haskell会这样做?
您使用的是沙箱吗? 'ghc-pkg list'不会显示安装在沙盒中的软件包。 –