GHC's DerivingVia extension (since 8.6) lets you compose typeclass instances without boilerplate newtype wrappers. A practical walkthrough with JSON encoding example, role restrictions, and a verification checklist.
Haskell's default laziness stores data fields as thunks. Making data types strict by default with StrictData prevents space leaks from thunk buildup, while selective laziness preserves composability where it matters.
Long-running Haskell services often leak memory through thunk accumulation, not retained data. GHC's StrictData pragma flips record fields to strict-by-default—here's how to apply it safely and verify it with heap profiles.
Learn how to use Haskell's STM primitives to safely update a shared counter from multiple threads, compile with GHC, run with threading enabled, and verify the result.
Long-running Haskell services leak memory through lazy thunks in accumulators. Here's how BangPatterns, strict fields, and StrictData fix it — plus the WHNF trap and how to verify the fix with +RTS -s.
Goal Upgrade a small Haskell application from GHC 9.6 to GHC 9.8, targeting a specific Stackage LTS snapshot, while avoiding downtime during the build and deployment cycle. Constraints and Uncertainty Ambiguous type variable warnings may surface when the code uses custom type families or newtype wrappers not fully resolved by the snapshot. Reproducible build
Goal A Haskell program prints non-ASCII text to stdout and succeeds on a UTF-8 developer machine, but the same compiled binary raises a text-decoding exception in a minimal production container. The goal is to diagnose whether GHC's default handle encoding follows the C library locale. Constraints GHC 7.8 and later open stdin, stdout, and stderr using the lo