Euterpeaを使用するプロジェクトを作成しようとしています。私は私が私の.cabal
ファイルのbuild-depends
セクションにEuterpea
を追加する必要があることを示唆し、次のエラーを取得するstack build
を実行私の.cabalファイルを `スタックビルド 'するのはなぜですか?
。
$ sb
composition-0.1.0.0: build (lib + exe)
Preprocessing library composition-0.1.0.0...
[2 of 2] Compiling Lib (src/Lib.hs, .stack-work/dist/x86_64-linux-nix/Cabal-1.24.2.0/build/Lib.o)
/home/matthew/backup/composition/composition/src/Lib.hs:5:1: error:
Failed to load interface for ‘Euterpea’
It is a member of the hidden package ‘Euterpea-2.0.4’.
Perhaps you need to add ‘Euterpea’ to the build-depends in your .cabal file.
Use -v to see a list of the files searched for.
-- While building package composition-0.1.0.0 using:
/home/matthew/.stack/setup-exe-cache/x86_64-linux-nix/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-linux-nix/Cabal-1.24.2.0 build lib:composition exe:composition-exe --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
私はそこEuterpea
を追加し、私の.cabal
ファイルのlibrary
セクションは、次のとおりです。
library
hs-source-dirs:
src
build-depends: base >= 4.7 && < 5
, Euterpea
exposed-modules:
Lib
other-modules:
Paths_composition
default-language: Haskell2010
しかし、私は再びstack build
を実行すると、それは同じエラーを与える - とlibrary
セクションでは、その後、
library
hs-source-dirs:
src
build-depends:
base >= 4.7 && < 5
exposed-modules:
Lib
other-modules:
Paths_composition
default-language: Haskell2010
なぜように見えるし、バックそれはもともと何だったかに私の.cabal
ファイルを変更しますstack build
私のcabal
ファイルを変更していますか?私はこれまでに起こったことを見たことがありません。
サイドノート:それが関連している わからない場合は、しかし.cabal
ファイルの形式は、それが通常よりも異なるように見えます。ここでは、以前のプロジェクトと同様に、私はstack new <project-name>
を実行して自動初期化しました。この予期しない振る舞いを引き起こすために私が以前のプロジェクトとは異なることがあったかどうかわかりません。stack build