2013-03-17 90 views

回答

3

cabal(可從cabal-install包得到,如果你還沒有的話)可以做到這一點。我將無恥地使用我剛剛發佈的universe包作爲一個運行的例子。對於搜索:

sorghum:~% cabal list universe 
* universe 
    Synopsis: Classes for types where we know all the values 
    Default available version: 0.0 
    Installed versions: 0.0 
    License: BSD3 

* universe-th 
    Synopsis: Construct a Dec's ancestor list. 
    Default available version: 0.0.0.6 
    Installed versions: [ Not installed ] 
    Homepage: http://github.com/jfishcoff/universe-th 
    License: BSD3 

出於相關信息:

sorghum:~% cabal info universe 
* universe   (library) 
    Synopsis:  Classes for types where we know all the values 
    Versions available: 0.0 
    Versions installed: 0.0 
    Homepage:  [ Not specified ] 
    Bug reports: [ Not specified ] 
    Description: A small package, in the spirit of data-default, which allows 
        the munging of finite and recursively enumerable types 
    Category:  Data 
    License:  BSD3 
    Author:  Daniel Wagner 
    Maintainer: [email protected] 
    Source repo: [ Not specified ] 
    Dependencies: base ==4.*, void >=0.1 && <0.6 
    Documentation: /home/dmwit/.cabal/x86_64/share/doc/universe-0.0/html 
    Cached:  No 
    Modules: 
     Data.Universe 
     Data.Universe.Helpers 

要下載和解壓:

sorghum:~% cabal unpack universe 
Downloading universe-0.0... 
Unpacking to universe-0.0/ 

您也可以只下載而不cabal fetch拆包,以便您可以享受--no-dependencies標誌(或者再次也許不是)。

1

AFAIK目前的hackage沒有它。但新的一個has一些基本的API調用。他們中的大多數都返回html,但其中一些返回JSON表示。

+0

這看起來很有趣,但正如你所說的,大部分響應都是HTML,並且沒有辦法獲得依賴關係列表:/ – 2013-03-17 23:28:09

+0

與包依賴關係一樣嗎?你可以使用Cabal庫。 – 2013-03-18 00:09:54