nw-pbt-haskell

Apply property-based testing in Haskell using QuickCheck and Hedgehog.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/StudentCristian/nWave-github --skill nw-pbt-haskell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nw-pbt-haskell
Source: https://github.com/StudentCristian/nWave-github/tree/main/.github/skills/nw-pbt-haskell
Command: npx skills add https://github.com/StudentCristian/nWave-github --skill nw-pbt-haskell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Haskell projects often rely on example-based tests that miss edge cases; this skill provides practical guidance for property-based testing with QuickCheck and Hedgehog to improve test coverage and robustness.

Core Features & Use Cases

  • QuickCheck basics: arbitrary generators, properties, and simple shrinking.
  • Hedgehog capabilities: integrated shrinking, stateful testing, and composable generators.
  • Guidance on framework selection, when to use each tool, and common pitfalls in real projects.

Quick Start

Run a QuickCheck example to verify that reversing a list twice yields the original.

Frequently Asked Questions about nw-pbt-haskell

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

FAQPage Schema
How do I apply property-based testing in Haskell to improve test coverage?

Property-based testing in Haskell uses frameworks like QuickCheck and Hedgehog to automatically generate test cases, replacing example-based tests to catch edge cases and improve correctness.

QuickCheck vs Hedgehog: which Haskell property testing framework should I use?

Choose QuickCheck for simple pure properties and basic shrinking; choose Hedgehog when you need integrated shrinking, composable generators, or stateful testing capabilities in your Haskell project.

How do I write generators and shrinking strategies for Haskell property tests?

Write generators and shrinking strategies by defining arbitrary instances in QuickCheck or using Hedgehog's composable generators, which provide integrated shrinking to minimize test failures automatically.

Can I use stateful testing with Haskell property testing frameworks?

Yes, stateful testing is supported by Hedgehog in Haskell, allowing you to model stateful commands and sequences to test complex stateful systems and verify their correctness.

What are common pitfalls when implementing property-based testing in Haskell?

Common pitfalls include inadequate generator coverage, improper shrinking strategies, and difficulty integrating property tests into existing Haskell projects, which can be avoided by following framework selection guidance.

Do I need any external dependencies to run Haskell property tests?

No external dependencies are required to use this Skill, which provides practical guidance for implementing QuickCheck and Hedgehog property tests, including generators, shrinking, and stateful testing patterns.