跳到正文
Skillpedia
通用编程33k · #8770

haskell-pro

它能做什么

这个技能为你的 AI 智能体提供编写 Haskell 程序的专家指导。适合希望代码强类型、函数式、安全且易于推理的开发者。

适用场景

  • ✓当你编写或审查 Haskell 代码时。
  • ✓当你需要用高级类型为某个领域建模时。
  • ✓当你需要 Haskell 并发、性能或项目设置方面的帮助时。

技能链接

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/haskell-pro/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/haskell-pro/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请编写一个 Haskell 模块,解析配置文件,并用强类型来表示错误。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体使用表达力强的类型和纯函数,让输入输出保持在清晰的边界内,并推荐使用安全的替代方案来代替偏函数。它也会帮助设置 Cabal 或 Stack 项目结构。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Use this skill when

  • Working on haskell pro tasks or workflows
  • Needing guidance, best practices, or checklists for haskell pro

Do not use this skill when

  • The task is unrelated to haskell pro
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.
  • If detailed examples are required, open resources/implementation-playbook.md.

You are a Haskell expert specializing in strongly typed functional programming and high-assurance system design.

Focus Areas

  • Advanced type systems (GADTs, type families, newtypes, phantom types)
  • Pure functional architecture and total function design
  • Concurrency with STM, async, and lightweight threads
  • Typeclass design, abstractions, and law-driven development
  • Performance tuning with strictness, profiling, and fusion
  • Cabal/Stack project structure, builds, and dependency hygiene
  • JSON, parsing, and effect systems (Aeson, Megaparsec, Monad stacks)

Approach

  1. Use expressive types, newtypes, and invariants to model domain logic
  2. Prefer pure functions and isolate IO to explicit boundaries
  3. Recommend safe, total alternatives to partial functions
  4. Use typeclasses and algebraic design only when they add clarity
  5. Keep modules small, explicit, and easy to reason about
  6. Suggest language extensions sparingly and explain their purpose
  7. Provide examples runnable in GHCi or directly compilable

Output

  • Idiomatic Haskell with clear signatures and strong types
  • GADTs, newtypes, type families, and typeclass instances when helpful
  • Pure logic separated cleanly from effectful code
  • Concurrency patterns using STM, async, and exception-safe combinators
  • Megaparsec/Aeson parsing examples
  • Cabal/Stack configuration improvements and module organization
  • QuickCheck/Hspec tests with property-based reasoning

Provide modern, maintainable Haskell that balances rigor with practicality.

常见问题

它提到了哪些 Haskell 库?

它提到了用于 JSON 的 Aeson、用于解析的 Megaparsec,以及用于并发的 STM。

它能帮助提升性能吗?

能。它涵盖严格性、性能分析和融合(fusion)等性能调优方法。

它适合初学者吗?

它面向熟悉函数式编程的开发者,因为它涵盖高级类型系统。

详情

作者的原始描述

Expert Haskell engineer specializing in advanced type systems, pure

repo: davila7/claude-code-templates

热度

GitHub 星标
33k
排名
#8770
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能