跳到正文
cccskills
免费在 GitHub 公开

hoogle

Search Haskell APIs using Hoogle. Use when working with Haskell projects to look up function signatures, find functions by type, discover library documentation, or identify which module exports an item.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(4)

  • SKILL.md2.6 KB
  • scripts/hoogle-init-db.sh2.2 KB
  • scripts/hoogle-remote.sh2.2 KB
  • scripts/hoogle-search.sh2.3 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Hoogle API Search

Hoogle is a Haskell API search engine. Use it to find functions by name or by type signature.

When To Use Hoogle

Use Hoogle when:

  • Working with Haskell code and needing to find a function.
  • Looking up a type signature.
  • Searching for functions that match a type signature, such as a -> b -> a.
  • Finding which module exports a particular function.
  • Looking up documentation for Haskell functions.

Search Methods

Search by function name:

.codex/skills/hoogle/scripts/hoogle-search.sh "map"

Search by type signature:

.codex/skills/hoogle/scripts/hoogle-search.sh "a -> b -> a"

Search with a package filter:

.codex/skills/hoogle/scripts/hoogle-search.sh "+base map"
.codex/skills/hoogle/scripts/hoogle-search.sh "+containers Data.Map.lookup"

Get detailed information for the first result:

.codex/skills/hoogle/scripts/hoogle-search.sh "foldl" --info

Remote search is available when local search is unavailable or insufficient:

.codex/skills/hoogle/scripts/hoogle-remote.sh "map"

Result Shape

The search scripts return JSON:

{
  "results": [
    {
      "url": "https://hackage.haskell.org/package/base/docs/Prelude.html#v:map",
      "module": { "name": "Prelude", "url": "..." },
      "package": { "name": "base", "url": "..." },
      "item": "map :: (a -> b) -> [a] -> [b]",
      "docs": "..."
    }
  ],
  "query": "map",
  "count": 10
}

Key fields are item, docs, module.name, and package.name.

Database Initialization

Before local searching, ensure the Hoogle database exists:

.codex/skills/hoogle/scripts/hoogle-init-db.sh

For project-specific searches, generate a local database from Haddock docs:

.codex/skills/hoogle/scripts/hoogle-init-db.sh --local /path/to/haddock/docs

Common Search Patterns

GoalQuery Example
Find function by namefilter
Find by exact type(a -> Bool) -> [a] -> [a]
Find in specific package+lens view
Find class methodsMonad m => m a -> m b
Find by partial typeMap k v -> k -> Maybe v

Error Handling

If searches fail with database errors, regenerate the database:

.codex/skills/hoogle/scripts/hoogle-init-db.sh --force

If local search cannot work, use remote search or Hoogle's JSON endpoint:

https://hoogle.haskell.org/?hoogle=<URL_ENCODED_QUERY>&mode=json

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

haddock

免费

Read Haskell package documentation, Haddock HTML, Hackage pages, or dependency source for cabal nix-style projects. Prefer locally built/cached docs and source from the cabal store, dist-newstyle, plan.json, and repo-cache; fall back to Hackage only for packages outside the project dependency set or when local docs are unavailable.

中文简介正在准备中。当前显示原文说明。

konn/tamagoh32026年8月2日 更新

haskell

免费

Super-skill for developing Haskell projects with cabal nix-style builds. Orchestrates HLS diagnostics, Haddock, Hoogle, source formatting, and cabal-gild into one workflow. Use when writing, editing, refactoring, building, typechecking, fixing compiler errors, renaming symbols, looking up APIs, or changing dependencies in Haskell projects. Treat cabal.project as the source of truth, prefer HLS before full builds, and prefer local docs over remote lookup.

中文简介正在准备中。当前显示原文说明。

konn/tamagoh32026年8月2日 更新

Format Haskell package descriptions and cabal project files with cabal-gild: *.cabal, cabal.project, cabal.project.local, and cabal.project.freeze. Use after editing dependencies or stanzas, when refreshing cabal-gild discover module lists, or when checking cabal file formatting.

中文简介正在准备中。当前显示原文说明。

konn/tamagoh32026年8月2日 更新

Format Haskell source files: *.hs, *.lhs, and *.hsig, with the project's configured formatter: fourmolu, ormolu, or stylish-haskell. Use before compiling, after source edits, and when applying project style.

中文简介正在准备中。当前显示原文说明。

konn/tamagoh32026年8月2日 更新

查看 konn 的全部技能

报告此技能的问题