本文介绍了如何在cabal-dev中使用runhaskell?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不幸的是,cabal-dev ghci在该项目中不起作用,我得到一个错误:

 正在加载软件包download-0.3。 2 ...链接... 
ghc:/home/stulli/haskell/ifdl/cabal-dev//lib/download-0.3.2/ghc-7.4.1/HSdownload-0.3.2.o:未知符号`stat64'
ghc:无法加载软件包 download-0.3.2

所以我尝试使用runhaskell,但是它使用的是cabal而不是cabal-dev安装的软件包,因此失败了。错误:

  $ runhaskell -isrc:src / test -package-conf = cabal-dev / packages-7.4.1.conf src / test / Test.hs 
Test.hs:/home/stulli/haskell/ifdl/cabal-dev//lib/download-0.3.2/ghc-7.4.1/HSdownload-0.3.2.o :未知符号'stat64'
Test.hs:Test.hs:无法加载软件包'download-0.3.2'

cabal-dev安装可以正常工作。

解决方案

您可以尝试一下g如下所示:

  runhaskell -package-conf = cabal-dev / packages-7.0.3.conf main.hs 

但是我想如果 cabal-dev ghci 不不起作用,那么 runhaskell 也不起作用。您需要找出 download 软件包出了什么问题。


Unfortunately cabal-dev ghci does not work in this project, i get an error:

Loading package download-0.3.2 ... linking ... 
ghc: /home/stulli/haskell/ifdl/cabal-dev//lib/download-0.3.2/ghc-7.4.1/HSdownload-0.3.2.o: unknown symbol `stat64'
ghc: unable to load package `download-0.3.2'

So i try runhaskell, but it uses the packages that come installed with cabal instead of cabal-dev and thus fails.

update:runhaskell produces the same error:

$ runhaskell -isrc:src/test -package-conf=cabal-dev/packages-7.4.1.conf src/test/Test.hs
Test.hs: /home/stulli/haskell/ifdl/cabal-dev//lib/download-0.3.2/ghc-7.4.1/HSdownload-0.3.2.o: unknown symbol `stat64'
Test.hs: Test.hs: unable to load package `download-0.3.2'

cabal-dev install on the other hand works without problems.

解决方案

You can try something like the next:

runhaskell -package-conf=cabal-dev/packages-7.0.3.conf main.hs

But I think if cabal-dev ghci doesn't work, then runhaskell will not work too. You need to find out what is wrong with download package.

这篇关于如何在cabal-dev中使用runhaskell?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 07:02