3

我想安装Snap,但我是Haskell及其平台的新手。安装semigroups失败cabal

我用阴谋来安装快照,并将其安装失败半群:

% cabal install snap 
Resolving dependencies... 
Configuring semigroups-0.8.3... 
Preprocessing library semigroups-0.8.3... 
Building semigroups-0.8.3... 
[1 of 4] Compiling Numeric.Natural.Internal (Numeric/Natural/Internal.hs, dist/build/Numeric/Natural/Internal.o) 
[2 of 4] Compiling Numeric.Natural (Numeric/Natural.hs, dist/build/Numeric/Natural.o) 
[3 of 4] Compiling Data.List.NonEmpty (Data/List/NonEmpty.hs, dist/build/Data/List/NonEmpty.o) 

Data/List/NonEmpty.hs:115:4: 
    Can't make a derived instance of `Data (NonEmpty a)' 
     (You need -XDeriveDataTypeable to derive an instance for this class) 
    In the data type declaration for `NonEmpty' 

Data/List/NonEmpty.hs:115:10: 
    Can't make a derived instance of `Typeable (NonEmpty a)' 
     (You need -XDeriveDataTypeable to derive an instance for this class) 
    In the data type declaration for `NonEmpty' 

这是我的版本小集团的:

% cabal --version 
cabal-install version 0.10.2 
using version 1.10.2.0 of the Cabal library 

我已经看到,半群是许多快的依赖依赖关系,我如何纠正这个安装?

我在Ubuntu的使用GNOME 运行« - 乐山猫Lucide - VOUS utilisez actuellement的Ubuntu 10.04 LTS版本出击EN 2010艾薇»

编辑:

在semigroups.cabal文件,在包,我看到这个:

if !impl(hugs) 
    other-extensions: DeriveDataTypeable 
    cpp-options: -DLANGUAGE_DeriveDataTypeable 

我可能必须使«impl(拥抱)»返回一些虚假的东西? (但我不知道它是什么:))

谢谢

+0

看来这个软件包还没有经过比较近期的GHC的测试,需要将'XDeriveDataTypeable'添加到它的.cabal标志中。 – 2012-04-24 13:40:37

+0

做哟知道我可以如何设置这个标志? – niahoo 2012-04-24 14:14:28

+0

Ow,添加到«its».cabal标志,而不是我的。 Hummm ...所以没有什么可做的...... – niahoo 2012-04-24 14:20:56

回答

2

您可以通过调用阴谋通GHC特有的标志对这些各种各样的标志

cabal install snap --ghc-option=-XDeriveDataTypeable 

更多信息,可在“用于建设的程序”部分的Cabal Users Guide

+0

工作。现在我看看这个命令行,«--ghc-option»看起来很明显! ;) 谢谢 – niahoo 2012-04-24 16:02:06