Bỏ qua tới nội dung
TakoAPI
Quay lại kỹ năng

haskell

bởi mightybyte

Coding Agents & IDEs
—Chưa có đánh giá
Đánh giá của bạn

Tóm tắt

Expert Haskell development skill.

Mô tả

Kỹ năng này làm gì

Expert guide for Haskell development covering type-driven design, GHC extensions, Cabal and Nix builds, testing with HSpec and QuickCheck, and performance profiling. Includes project structure templates, common patterns like the ReaderT pattern, and a curated library reference.

Consolidates build tooling, type system patterns, library selection, and performance guidance in one reference, avoiding context-switching across separate documentation sources.

Khi nào nên dùng

  • Designing domain models with phantom types to enforce compile-time state transitions
  • Setting up a new Cabal project with proper module layout and GHC warning flags
  • Debugging space leaks using GHC heap profiling and strictness annotations
  • Writing property-based tests with QuickCheck for pure functions
  • Building a JSON HTTP service with Warp and aeson

Quy trình ví dụ

ĐẦU VÀO

User asks: How do I model an article publishing workflow so invalid state transitions are impossible?

AGENT
  1. 1

    Define phantom types Draft and Published as empty data declarations

  2. 2

    Parameterize the Article type over a state phantom type variable

  3. 3

    Write a publish function typed Article Draft -> Article Published so the transition is enforced by the compiler

  4. 4

    Add a share function accepting only Article Published to prevent sharing unpublished content

ĐẦU RA

A type-safe state machine where attempting to share a Draft article is a compile error, not a runtime failure

Cài đặt

clawhub install mightybyte/haskell

Chạy lệnh CLI, hoặc dán prompt vào Claude Code, Cursor, Codex hay coding agent bạn đang dùng.

Liên kết