gpt4 book ai didi

haskell - Hackage 有 API 吗?

转载 作者:行者123 更新时间:2023-12-01 01:11:10 25 4
gpt4 key购买 nike

我希望能够搜索一个包并获得一个下载链接以及所有依赖项的列表。有没有一种简单的方法可以通过命令行或 Haskell 模块来做到这一点?

最佳答案

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: daniel@wagner-home.com
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标志(或者也许不是)。

关于haskell - Hackage 有 API 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15467478/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com