Testing Haskell code
A Haskell test is a program that compares what a function returns with what it should return, and the run reports the answer through its exit status. Everything else a framework adds sits on top of that: a line per check, a message that names the values, a summary, and a status the build server reads. These pages build that base by hand, because the libraries that package it, HUnit, hspec, tasty and QuickCheck, are not in the image and there is no network here to fetch them.
Every page shows code that was compiled and run, with the real output and the real exit status. The last page is the exception and says so: it covers the five tools that are not installed, with the error the resolver prints for a missing package and the route to install each one on a machine with a network. Nothing on these pages is a guess.
The pages are independent of the Haskell course: read one when you need it. The lessons behind them are running a Cabal test suite, GHC flags and testing the capstone parser.
The programs on these pages were built with GHC 9.10.3 and cabal-install 3.16.0.0, and run on Alpine Linux 3.24.3 (x86_64) in a Docker container.