Generate High-Assurance Haskell Code
Haskell expert skill for advanced type systems, pure functional architecture, STM concurrency, and law-driven typeclass design.
Why it matters
Leverage advanced Haskell expertise to design and implement robust, high-assurance systems. This skill provides guidance on best practices, advanced type systems, and efficient functional programming patterns.
Outcomes
What it gets done
Implement idiomatic Haskell with strong types and advanced features like GADTs and type families.
Design pure functional architectures and ensure total function design.
Write property-based tests using QuickCheck or Hspec for rigorous validation.
Optimize performance through strictness analysis, profiling, and fusion techniques.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-haskell-pro | bash Overview
Haskell Pro
A Haskell expert skill covering advanced type systems, pure functional architecture, STM/async concurrency, law-driven typeclass design, and Cabal/Stack project hygiene. It outputs idiomatic, strongly-typed Haskell with property-based tests. Use it for Haskell tasks needing type-system design, pure architecture, concurrency, performance tuning, or build configuration guidance; not for tasks outside the Haskell domain.
What it does
This skill acts as a Haskell expert specializing in strongly typed functional programming and high-assurance system design. Its focus areas span 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 and law-driven development, performance tuning through strictness, profiling, and fusion, Cabal/Stack project structure and dependency hygiene, and JSON/parsing/effect systems using Aeson, Megaparsec, and monad stacks.
Its approach is to model domain logic with expressive types, newtypes, and invariants; prefer pure functions and isolate IO to explicit boundaries; recommend safe, total alternatives to partial functions; use typeclasses and algebraic design only when they add clarity; keep modules small and easy to reason about; suggest language extensions sparingly with an explanation of their purpose; and provide examples that are runnable in GHCi or directly compilable. For deeper worked examples, it can open a bundled resources/implementation-playbook.md.
When to use - and when NOT to
Use it for Haskell tasks needing guidance, best practices, or checklists - advanced type-system design, pure architecture, STM/async concurrency, typeclass design, performance tuning, build configuration, or parsing/effect-system work. Before acting, it clarifies goals, constraints, and required inputs, then applies relevant best practices and validates outcomes with actionable steps.
Do not use it for tasks unrelated to Haskell, or when a different domain or tool is needed outside this scope.
Inputs and outputs
Input is a Haskell development task, design question, or codebase needing review against strongly-typed, pure-functional best practices. Output is idiomatic Haskell with clear signatures and strong types, using GADTs, newtypes, type families, and typeclass instances where helpful; pure logic cleanly separated from effectful code; STM/async concurrency patterns with exception-safe combinators; Megaparsec/Aeson parsing examples; Cabal/Stack configuration and module-organization improvements; and QuickCheck/Hspec tests built on property-based reasoning.
Who it's for
Developers building high-assurance Haskell systems who want modern, maintainable code that balances type-system rigor with practicality - from domain modeling and concurrency to build hygiene and property-based testing.
FAQ
Common questions
Discussion
Questions & comments ยท 0
Sign In Sign in to leave a comment.