Diagnosing and Fixing Space Leaks in Haskell Applications
Learn how to identify and resolve space leaks in Haskell by diagnosing thunk build-up using GHC profiling tools and applying strictness annotations.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to identify and resolve space leaks in Haskell by diagnosing thunk build-up using GHC profiling tools and applying strictness annotations.
GHC's DerivingVia extension lets you attach typeclass instances by delegating to existing instances — no newtype wrappers, zero runtime cost. A practical walkthrough with Age/Sum Int, chaining strategies, and Core verification.
STM replaces lock-based synchronization with composable atomic blocks that retry on conflict, eliminating deadlocks and providing automatic rollback. This note covers GHC 8.10–9.8 runtime behavior, trust boundaries, operational checks, failure modes, and when to choose alternatives.
Learn how Haskell's Algebraic Data Types let you model network responses with compile-time safety, preventing runtime errors through exhaustive pattern matching.
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.
Learn how to balance Haskell's lazy evaluation with strictness annotations to prevent space leaks and implement efficient infinite data structures.
A decision guide for Haskell developers choosing between forkIO, async, and STM for concurrency, featuring a comparison table and a concrete STM implementation.
ApplicativeDo lets GHC rewrite eligible do‑blocks as applicative expressions, reducing overhead while preserving semantics.
GHC LinearTypes lets the type checker enforce single-use resource handling at compile time, with no runtime overhead.