haskell-reviewer

Reviews Haskell code for correctness, idiomatic style, performance pitfalls, and best practices.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Haskell code reviews demand deep knowledge of laziness, partial functions, transformer stacks, and GHC extensions, and inconsistent reviewer expertise lets real bugs and space leaks slip through. This Skill provides a structured, opinionated review checklist so every Haskell change is checked against the same correctness, performance, and style standards. ## Core Features & Use Cases - Correctness and Performance Checks: Flags partial functions (head, read, fromJust), lazy folds, lazy IO, String overuse, and non-strict data fields that cause crashes and space leaks. - Architecture Review: Enforces the ReaderT Env IO pattern, flagging deep transformer stacks, StateT/ExceptT misuse, and mutable business state in the environment. - Mechanical Linting: Bundles scripts/check_alignment.py to detect content-dependent vertical alignment that bloats diffs, plus an eval suite to regression-test review quality. - Use Case: Before merging a pull request on a Haskell service, run a review to catch a lazy foldl space leak, a partial head call, and a missing Default instance, with findings organized by severity and concrete fixes. ## Quick Start Review this Haskell module for correctness, performance, and style issues, organizing findings by severity with concrete suggested fixes.

Frequently Asked Questions about haskell-reviewer

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

FAQPage Schema
How do I review Haskell code for common bugs and performance issues?

Check for partial functions like head, read, and fromJust, lazy foldl instead of foldl', lazy Prelude.readFile, String instead of Text, and non-strict data fields. Organize findings by severity: bugs, performance, design, then style, with a concrete fix for each.

What is the ReaderT Env IO pattern in Haskell applications?

The ReaderT Env IO pattern makes the application monad a newtype over ReaderT Env IO rather than a deep transformer stack. The environment holds resources like connection pools and loggers, while mutable state uses IORef or TVar instead of StateT, and errors use IO exceptions instead of ExceptT.

How do I detect vertical alignment problems in Haskell source files?

Run the bundled check_alignment.py script on your Haskell files with python3 scripts/check_alignment.py File.hs. It flags tokens padded to the same column across consecutive lines, which forces noisy re-spacing diffs when identifiers change, while suppressing acceptable constant-width import padding.

Which GHC language extensions are safe to enable by default?

Keep default-extensions limited to a conservative set: DeriveGeneric, DerivingStrategies, LambdaCase, and ScopedTypeVariables. Put all other extensions in per-file LANGUAGE pragmas, and be cautious with TemplateHaskell, UndecidableInstances, and AllowAmbiguousTypes without clear justification.

When should I use a bespoke error type versus Either String in Haskell?

Default to Either String or ExceptT String for expected failures in ordinary control flow. A bespoke error ADT is only warranted when callers actually pattern-match on it for flow control; otherwise it adds complexity without benefit and hurts readability.