在我的其中一个项目中,我想使用llvm-general
和llvm-general-pure
,但我想使用与llvm 3.9一起工作的llvm-3.9分支,这些库的最新版本hackage适用于llvm 3.5。如何在堆栈中使用llvm-general的特定分支
我的项目是一个堆栈的项目,这是我在stack.yaml:
resolver: nightly-2017-05-01
packages:
- '.'
- location:
git: https://github.com/bscarlet/llvm-general.git
commit: 61fd03639063283e7dc617698265cc883baf0eec
subdirs:
- llvm-general
- llvm-general-pure
extra-dep: true
所有其他选项留为默认值。
这是我project.cabal:
name: compiler-final
version: 0.1.0.0
category: Compiler
build-type: Simple
-- extra-source-files:
cabal-version: >=1.10
library
hs-source-dirs: src
exposed-modules: Lexer,Parser,ParserTestData,CodeGen
other-modules: Prelude,StateTUtil
ghc-options: -Wall -dcore-lint -fhpc -XNoImplicitPrelude -fobject-code
build-depends: base-noprelude >= 4.7 && < 5 , megaparsec < 6 , transformers < 1, unordered-containers < 1 , hashable < 2
,classy-prelude , either < 5 , mono-traversable < 2 , logfloat < 0.14 , text
default-language: Haskell2010
default-extensions: OverloadedStrings
executable compiler-final-exe
hs-source-dirs: app
main-is: Main.hs
ghc-options: -threaded -rtsopts -XNoImplicitPrelude -with-rtsopts=-N -fobject-code
build-depends: base
, compiler-final
default-language: Haskell2010
default-extensions: OverloadedStrings
test-suite compiler-final-test
type: exitcode-stdio-1.0
hs-source-dirs: test
other-modules: LexerSpec , ParserSpec
main-is: Spec.hs
build-depends: base
, compiler-final, megaparsec < 6 , hspec < 3,hspec-megaparsec >= 0.3,unordered-containers < 1
,hashable,transformers < 1,text,bytestring , mtl, text
ghc-options: -threaded -rtsopts -with-rtsopts=-N -fhpc -Wall -XNoImplicitPrelude -fobject-code
default-language: Haskell2010
default-extensions: OverloadedStrings
Benchmark compiler-final-bench
type: exitcode-stdio-1.0
hs-source-dirs: bench
main-is: Bench.hs
other-modules: ParserBench
build-depends: base,compiler-final,megaparsec < 6 ,unordered-containers < 1,QuickCheck<3
,hashable
ghc-options: -rtsopts -auto-all -caf-all -fforce-recomp -fobject-code
default-language: Haskell2010
不幸的是在CodeGen.hs这个简单的import语句不会编译:import LLVM.General.AST
,它说,它没有找到该模块。
现在我有LLVM-一般分支3.9通过cabal install
全局安装和我可以ghci -package
(未stack ghci
)存取,并在上述模块存在。
我尝试添加llvm-general
和llvm-general-pure
我依存列表与3.9.0.0
版本,但堆栈似乎尝试,因为它报告有关不匹配的版本错误安装版3.5
。
那么如何实现我想要的?
更换对应库整个
location
场“它报告有关版本不匹配错误,”你能发布的错误? –