2

fayをインストールしようとしていますが、src のコンパイルに失敗します。

$ cabal install fay
...
Preprocessing executable 'fay' for fay-0.10.1.0...
[ 1 of 14] Compiling Data.List.Extra  ( src/Data/List/Extra.hs, dist/build/fay/fay- tmp/Data/List/Extra.o )
[ 2 of 14] Compiling System.Process.Extra ( src/System/Process/Extra.hs, dist/build/fay/fay-tmp/System/Process/Extra.o )    
...
[13 of 14] Compiling Language.Fay     ( src/Language/Fay.hs, dist/build/fay/fay-tmp/Language/Fay.o )
[14 of 14] Compiling Main             ( src/Main.hs, dist/build/fay/fay-tmp/Main.o )

src/Main.hs:89:55:
Couldn't match expected type `Either ParseError (Maybe String)'
            with actual type `Maybe b0'
Expected type: b0 -> Either ParseError (Maybe String)
  Actual type: b0 -> Maybe b0
In the first argument of `(.)', namely `Just'
In the first argument of `reader', namely `(Just . Just)'

src/Main.hs:96:35:
Couldn't match expected type `Either ParseError a0'
            with actual type `Maybe b0'
Expected type: b0 -> Either ParseError a0
  Actual type: b0 -> Maybe b0
In the first argument of `(.)', namely `Just'
In the first argument of `reader', namely
  `(Just . wordsBy (== ','))'
Failed to install fay-0.10.1.0
cabal: Error: some packages failed to install:
fay-0.10.1.0 failed during the building phase. The exception was:
ExitFailure 1

これは私のミスなのかパッケージの問題なのかわかりません。

私が使用している: arch linux、ghc-7.4.2、cabal-1.16.0.3

4

1 に答える 1

7

依存関係が十分に厳密に指定されていないため、パッケージの問題であることは間違いありません。パッケージがPackage Versioning Policyに従っている場合、依存関係を満たすことができれば、パッケージをビルドする必要があります。

fay パッケージの説明を見ると、ほとんどの依存関係に下限または上限がないことがわかります。したがって、基本的には、実験する必要があります。

コードを見るとreader、エラーに記載されているのはOptions.Applicative.Builder.readerであることがわかります。この関数は 0.4.3 と 0.5.0 の間で型シグネチャを変更したため、 に渡してoptparse-applicativeをダウングレードしてみてください。--constraint "optparse-applicative < 0.5"cabal install

于 2012-12-23T11:08:20.333 に答える