haskell-coder

Guides Haskell development covering type-driven design, Cabal builds, testing, and performance optimization.

1|Updated Jun 23, 2026
One-click install
npx skills add https://github.com/seal-harness/seal-harness --skill haskell-coder-seal-harness
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: haskell-coder
Source: https://github.com/seal-harness/seal-harness/tree/main/.agents/skills/haskell-coder
Command: npx skills add https://github.com/seal-harness/seal-harness --skill haskell-coder-seal-harness

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing idiomatic, maintainable Haskell requires navigating GHC extensions, build tooling, strictness pitfalls, and a large library ecosystem. This Skill provides an opinionated, expert-level guide so Haskell code is correct, performant, and consistent from the start. ## Core Features & Use Cases - Type-Driven Design Guidance: Make illegal states unrepresentable with newtypes, phantom types, smart constructors, and the ReaderT Env pattern. - Build & Tooling Setup: Cabal project structure, multi-package projects, Nix-based development with haskell-flake, and CI configuration. - Testing & Performance: Hspec and QuickCheck testing patterns, strictness rules, profiling workflows, and common space-leak fixes. - Use Case: When asked to scaffold a new Haskell web service, the Skill produces a Cabal project with a ReaderT-based app monad, strict data types, Hspec tests, and a Nix dev shell. ## Quick Start Use the haskell-coder skill to scaffold a new Cabal project with a library, executable, and Hspec test suite following best practices.

Frequently Asked Questions about haskell-coder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a new Haskell project with Cabal?

Run cabal init to generate a .cabal file defining library, executable, and test-suite stanzas with build-depends and default-language Haskell2010. Use a common stanza to share warning flags like -Wall and -Wcompat across components, and follow the PVP for dependency version bounds.

What GHC extensions should I enable by default in Haskell?

Enable only DeriveGeneric, DerivingStrategies, LambdaCase, and ScopedTypeVariables via default-extensions in the cabal file. Enable everything else, such as OverloadedStrings or TemplateHaskell, with per-file LANGUAGE pragmas to keep effects localized and auditable.

Should I use String or Text in Haskell?

Use Text from the text package for all string data; String is a linked list of Char and performs poorly. Enable OverloadedStrings per-file for Text literals, and use ByteString for binary data.

How do I fix space leaks in Haskell?

Use the strict left fold foldl' instead of lazy foldl, add bang patterns to accumulator bindings, and mark record fields strict with bangs. Profile with cabal build --enable-profiling and run with +RTS -hc to inspect heap usage.

ReaderT vs mtl transformer stacks in Haskell applications?

Prefer a single ReaderT Env IO newtype over deep stacks like ExceptT over StateT over ReaderT. Store mutable state in IORef or TVar fields inside the environment, throw exceptions in IO, and use Has-typeclass constraints for granular access.

Can I use Nix for Haskell development?

Yes, use haskell-flake or nixpkgs haskellPackages shellFor to get reproducible builds with pinned GHC versions and tools like haskell-language-server and ghcid. Overrides let you pin Hackage versions, apply jailbreaks, or add C library dependencies.