hoogle
805
Stars
153
Forks
15
Watchers
116
Open Issues
NOASSERTION
许可证
Haskell
语言
2012-04-19
创建时间
2026-11-07
最近更新
项目能做什么
Hoogle 是一款专为 Haskell 开发者打造的 API 搜索引擎。它主要解决查找函数时不记得名字的痛点,核心功能是不仅支持按函数名搜索,还能直接通过“近似类型签名”(如 `a -> a`)检索标准库及 Stackage 包,支持网页、本地命令行或 API 调用。
来源:AI 基于仓库事实生成
· 内容以仓库实际 README 为准
使用说明 查看原始 README 原仓库文档
中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# Hoogle [](https://hackage.haskell.org/package/hoogle) [](https://www.stackage.org/package/hoogle) [](https://github.com/ndmitchell/hoogle/actions)
Hoogle is a Haskell API search engine, which allows you to search many standard Haskell libraries by either function name, or by approximate type signature. The online version can be found at https://hoogle.haskell.org/ and searches [Stackage](https://www.stackage.org/).
* **Online version:** https://hoogle.haskell.org/
* **Hackage page:** https://hackage.haskell.org/package/hoogle
* **Source code:** https://github.com/ndmitchell/hoogle
* **Bug tracker:** https://github.com/ndmitchell/hoogle/issues
## Hoogle Use
Hoogle can be used in several ways:
* **Online**, with the web interface at https://hoogle.haskell.org/
* **In [IRC](https://wiki.haskell.org/IRC_channel)**, using the [Lambdabot](https://wiki.haskell.org/Lambdabot) plugin with `@hoogle` and `@hoogle+`
* **From `emacs`**, by means of [`engine-mode`](https://github.com/hrs/engine-mode)
* **[Installed locally](./docs/Install.md)**, with either a command line or in a browser
* **[As a developer](./docs/API.md)**, through Haskell or JSON APIs.
# Searches
## Searching
Here are some example searches:
* `map` searches as text, finding `map`, `concatMap`, `mapM`
* `con map` searches for the text "map" and "con" finding `concatMap`, but not `map`
* `a -> a` searches by type, finding `id :: a -> a`
* `a` searches for the text "a"
* `:: a` searches for the type "a"
* `id :: a -> a` searches for the text "id" and the type "a -> a"
## Scope
By default, searches look at the [Haskell Platform](https://www.haskell.org/platform/) and [Haskell keywords](https://wiki.haskell.org/Keywords). However, all [Stackage](https://stackage.org) packages are available to search. As some examples:
* `mode +cmdargs` searches only the "cmdargs" package
* `file -base` searches the Haskell Platform, excluding the "base" package
* `mode +platform +cmdargs` searches both the Haskell Platform and the "cmdargs" package
* `count +missingh` searches only the "MissingH" package - all packages are written in lower-case
With the set of packages you are searching, you can also restrict the set of modules searched:
* `file -System` excludes results from modules such as `System.IO`, `System.FilePath.Windows` and `Distribution.System`
* `fold +Data.Map` finds results in the `Data.Map` module
# Integration
## Command Line Version
To invoke Hoogle type:
$ hoogle "[a] -> [b]"
Note the quotes, otherwise you will redirect the output to the file [b].
To ensure you have data files for the Hackage modules, you will first need to
type:
$ hoogle generate
Which will download and build Hoogle databas
阅读完整原文
项目深度分析 AI 生成
企业私有 Haskell 代码库与依赖的 Hoogle 托管服务
| 产品构想 | 为重度使用 Haskell 的企业(如量化私募、Cardano生态团队)提供一键部署的内部 Hoogle 实例,自动同步并索引内部 Git 仓库和私有 Hackage 包。 |
| 核心功能 | 私有仓库与私有 Hackage/Stackage 自动索引、SSO/RBAC 访问控制、内部 API 变更通知、与企业内部文档系统打通。 |
| 目标用户 | 使用 Haskell 作为核心业务语言的中大型科技与金融企业技术负责人、架构师。 |
| 难度/周期 | 中等 · 2-3个月 · 成本:轻量云服务器/容器服务、索引存储(成本低,< $100/月) |
| 收费模式 | 按企业席位或内部私有包数量收取 SaaS 订阅费,或提供单租户私有化部署买断/年保服务。 |
| 竞争风险 | Haskell 商业化市场受众极窄,目标企业数量有限;企业可能直接基于开源版本自行搭建而无需付费。 |
| 依据 | 尚需验证的假设 |
IDE 智能增强插件与语义补全扩展 (Hoogle Pro Extension)
| 产品构想 | 构建与 VS Code / Neovim / LSP 深度集成的 Hoogle 商业插件,在开发者编写未定义函数或复杂类型时,基于类型推导自动推荐 Hoogle 索引的最佳实现或第三方依赖。 |
| 核心功能 | 行内类型查询交互、智能缺失导入推断、基于当前工程上下文的精准局部搜索、离线高频缓存。 |
| 目标用户 | 专业 Haskell 工程师、函数式编程教学机构学员。 |
| 难度/周期 | 中等 · 1-2个月 · 成本:客户端插件开发为主,极低服务端开销 |
| 收费模式 | Freemium 模式(基础查询免费,高级上下文补全和私有源联合查询收费 $5-$10/月)。 |
| 竞争风险 | 开源生态中已有免费命令行和编辑器集成(如 emacs engine-mode, bhoogle),开发者付费意愿极低。 |
| 依据 | AI推测 |
多强类型语言类型签名搜索引擎技术授权与定制解决方案
| 产品构想 | 将 Hoogle 的近似类型匹配算法(Type-driven Search)迁移或适配到其他强类型/函数式语言(如 Rust, Scala, PureScript, TypeScript),提供通用的根据类型签名搜 API 的开发者工具基础设施。 |
| 核心功能 | 跨语言通用类型匹配引擎、REST/gRPC 统一查询接口、自定义类型系统规则配置模块。 |
| 目标用户 | 开发者工具厂商(如 API 平台、代码搜索平台提供商)、跨语言大型工程团队。 |
| 难度/周期 | 高 · 4-6个月 · 成本:核心算法研发与多语言解析器开发的人力时间成本 |
| 收费模式 | 技术授权费用、B端定制开发咨询费。 |
| 竞争风险 | 研发周期长、难度高,且主流语言已有成熟的符号搜索工具,市场需求不明确。 |
| 依据 | 尚需验证的假设 |
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心
竞品与相似项目 GitHub Search 真实检索
相似项目数据正在完善中,暂不展示(避免误导)
项目优势与风险
| 技术成熟度 | 创建于 2012-04-19,近 30 天仍在推送,发布过 1 个 Release |
| 社区活跃 | Star 805 / Fork 153 / Issue 116(数据支持,可自行核实) |
| 许可证 | NOASSERTION |
| 主要风险 | 上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价 |
安装与使用
此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。