2012-03-11 69 views
6

我試圖讓Cabal安裝haskell-src-meta軟件包,並且我在template-haskell依賴項中遇到困難。爲haskell-src-meta的依賴既包括如何告訴Cabal使用哪個依賴項?

template-haskell >=2.7 && <2.9, 
template-haskell >=2.4 && <2.7, 

恰巧,template-haskell版本2.7及更高版本將不是我的系統上安裝,但template-haskell 2.5.0.0將安裝。

當我要求Cabal安裝haskell-src-meta,我該如何告訴它使用template-haskell == 2.5.0.0


這裏是cabal info haskell-src-meta我的系統上的全部信息:

* haskell-src-meta (library) 
    Synopsis:  Parse source to template-haskell abstract syntax. 
    Latest version available: 0.5.1 
    Latest version installed: [ Not installed ] 
    Homepage:  [ Not specified ] 
    Bug reports: https://github.com/benmachine/haskell-src-meta/issues 
    Description: The translation from haskell-src-exts abstract syntax to 
        template-haskell abstract syntax isn't 100% complete yet. 
    Category:  Language 
    License:  BSD3 
    Author:  Matt Morrow 
    Maintainer: Ben Millwood <[email protected]> 
    Source repo: git://github.com/benmachine/haskell-src-meta.git 
    Flags:   new-th 
    Dependencies: base >=4.2 && <4.6, haskell-src-exts >=1.8 && <1.12, 
        pretty >=1.0 && <1.2, syb >=0.1 && <0.4, th-lift ==0.5.*, 
        template-haskell >=2.7 && <2.9, 
        template-haskell >=2.4 && <2.7, uniplate >=1.3 && <1.7 
    Cached:  No 
    Modules: 
     Language.Haskell.Meta 
     Language.Haskell.Meta.Parse 
     Language.Haskell.Meta.Parse.Careful 
     Language.Haskell.Meta.Syntax.Translate 
     Language.Haskell.Meta.Utils 
     Language.Haskell.TH.Instances.Lift 

回答

9
cabal install --constraint="template-haskell == 2.5.0.0" haskell-src-meta 
+0

輝煌!完美的作品。我怎麼能發現這個?我在用戶指南中爬行,沒有成功...... – 2012-03-11 19:12:51

+1

我知道它很混亂,但'cabal install --help'有很多有用的東西。對於所有的小問題,Cabal在'∀COMMAND'下有相當數量的文檔。 cabal命令 - 幫助「 – 2012-03-11 21:10:11

相關問題