1

Snapを初めてインストールすると、次のエラーが発生します。最初にheistをインストールしようとしましたが、同じエラーが発生します。Ubuntu 12.04 32ビットデスクトップ(新しいインストール)とghc7.4.1を使用しています。

他の誰かがこのエラーを受け取りますか?解決?ありがとう。

[18 of 29] Compiling Snap.Snaplet.HeistNoClass ( src/Snap/Snaplet/HeistNoClass.hs, dist/build/Snap/Snaplet/HeistNoClass.o )

src/Snap/Snaplet/HeistNoClass.hs:195:32:
Couldn't match expected type `n0 (Either e'0 b0)'
            with actual type `Text'
Expected type: String -> n0 (Either e'0 b0)
  Actual type: String -> Text
In the first argument of `(.)', namely `T.pack'
In the first argument of `mapEitherT', namely
  `(T.pack . intercalate "")'
cabal: Error: some packages failed to install:
sample1-0.1 depends on snap-0.10.0.1 which failed to install.
snap-0.10.0.1 failed during the building phase. The exception was:
ExitFailure 1
snaplet-sqlite-simple-0.4.0 depends on snap-0.10.0.1 which failed to install.
4

2 に答える 2

2

errorsonの依存関係はeitherとして指定されてeither >= 3.0.1おりeither、のビルド依存関係としてリストされていませんsnap(使用されているモジュールControl.Monad.Trans.Eitherはから再エクスポートされるため、からのコードを直接使用しControl.Errorている場合でも、これは必要ありません)。したがって、ビルドはの最新バージョンを取り込みます。snapeithersnapeither

ただし、either-3.1では、タイプがmapEitherT変更されました。それは従来

mapEitherT :: Functor m => (e -> f) -> (a -> b) -> EitherT e m a -> EitherT f m b

either-3.0.*、そして今それは

mapEitherT :: (m (Either e a) -> n (Either e' b)) -> EitherT e m a -> EitherT e' n b

コードは古いバージョン用に書かれています。

either使用するバージョンを制限できます。

cabal install snaplet-sqlite-simple --constraint="either < 3.1"

それを構築します。

于 2013-01-27T18:56:44.833 に答える
0

スナップ0.11をハッキングにアップロードしました。これで問題も解決するはずです。

于 2013-01-28T15:40:09.077 に答える