2016-10-22 3 views
3

私はHaskellを学び、Emacs開発環境(this)をセットアップしようとしています。
私がすべきことの1つは、hindentをインストールすることです。
推奨方法hereは、ちょうどstack install hindentです。私はスタックのglobal-projectスペースにインストールする必要がありますね。 $HOME/.stack/global-project/stack.yamlでの私のグローバルスタックYAMLは次のとおりです。haskellスタックの基本的な使い方で失敗する

flags: {} 
extra-package-dbs: [] 
packages: [] 
extra-deps: [] 
resolver: ghc-7.10.3 

私は任意のシステムを使用していないが、ghc(私の$PATHにはghcghciはありません)。 stack install hindent
それはextra-depsを拡張するために私をadviced:

Run from outside a project, using implicit global project config 
Using resolver: ghc-7.10.3 from implicit global project's config file: /home/me/.stack/global-project/stack.yaml 

While constructing the build plan, the following exceptions were encountered: 

In the dependencies for hindent-5.2.1: 
    descriptive must match >=0.7 && <0.10, but the stack configuration has no specified version 
       (latest applicable is 0.9.4) 
    exceptions must match -any, but the stack configuration has no specified version (latest applicable is 0.8.3) 
    haskell-src-exts must match >=1.18, but the stack configuration has no specified version 
        (latest applicable is 1.18.2) 
    monad-loops must match -any, but the stack configuration has no specified version (latest applicable is 0.4.3) 
    mtl must match -any, but the stack configuration has no specified version (latest applicable is 2.2.1) 
    path must match -any, but the stack configuration has no specified version (latest applicable is 0.5.9) 
    path-io must match -any, but the stack configuration has no specified version (latest applicable is 1.2.0) 
    text must match -any, but the stack configuration has no specified version (latest applicable is 1.2.2.1) 
    unix-compat must match -any, but the stack configuration has no specified version (latest applicable is 0.4.2.0) 
    utf8-string must match -any, but the stack configuration has no specified version (latest applicable is 1.0.1.1) 
    yaml must match -any, but the stack configuration has no specified version (latest applicable is 0.8.20) 

Recommended action: try adding the following to your extra-deps in /home/me/.stack/global-project/stack.yaml: 
- descriptive-0.9.4 
- exceptions-0.8.3 
- haskell-src-exts-1.18.2 
- monad-loops-0.4.3 
- mtl-2.2.1 
- path-0.5.9 
- path-io-1.2.0 
- text-1.2.2.1 
- unix-compat-0.4.2.0 
- utf8-string-1.0.1.1 
- yaml-0.8.20 

私はそれはそれはsituatuationになり最後には(おそらく前に追加されたものの依存関係です)いくつかの新しい依存関係などを提案し、提案されたものを行う場合にはいくつかの2つの依存関係には未対応のバージョンがあります。

暗黙的な依存関係を取得することはビルドツールの仕事だと思うので、私の設定(またはスタックの理解)に何か問題があると推測します。

私の初心者の不具合は何か経験豊富な人が推測できますか?

+2

グローバルプロジェクトのリゾルバが 'ghc-7.10.3'である特別な理由はありますか? (私はあなたの問題の原因かもしれないと思う) – duplode

答えて

4

ghcバージョンをリゾルバとして使用することは一般的に推奨されていません。なぜなら、多くのバージョンのパッケージを手動で指定する必要があるからです。代わりに、lts-6.23に切り替えることをお勧めします。

+0

ありがとう。これまでのところ私が見た他の生態系の標準的なビルドツールとは少し違っています。 'lts-6.23'や' lts-7.5'でインストールされた 'hindent'バージョンはバージョン<5ですが、5が必要です。私は必要なものを得るために夜間に切り替えました。私の理由は正しいですか?あるいは、特定のバージョンの単一パッケージ( 'hindent')をどこかに指定するべきですか? – foki

+1

コマンドラインでhindentのバージョンを指定できますが、目的のバージョンの夜間スナップショットを選択するとよいでしょう。 –

0

わかりません。

stack upgrade --git && \ 
rm -rf ~/.stack  && \ 
stack setup   && \ 
stack install hindent 

GHC 8.Xと新しく新しいスタックを使ってみませんか? ;)

関連する問題