About This Title

Pages: 120
Published: April 2026
ISBN: 9798888651902
In Beta

Haskell Brain Teasers

Exercise Your Mind

by Rebecca Skinner

Challenge and exercise your functional programming knowledge by tackling these 20 fun, funky, and functional puzzles on Haskell programming topics such as lazy evaluation, Haskell syntax, type classes, and the type system. Gain new insight into why Haskell is the way it is. Build mind-bending self-referential and circular data structures, unpick the seams of reality with unsafePerformIO, build enhanced DSLs with QualifiedDo, and refactor without fear of the dreaded monomorphism restriction. Review or get introduced to Haskell’s common quirks such as the unary minus and pattern guards while mastering newer language features up to GHC 9.12, including linear arrows and Or Patterns.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $14.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal

This book is in Beta, final version expected Apr 2026

Beta Books: What do I get?


Employ powerful techniques and recognize common pitfalls as you solve fiendish Haskell puzzles across five different topic areas.

Don’t sleep on the lazy evaluation puzzles: they’ll challenge you to predict the behavior of programs that rely on laziness in unexpected ways. Think syntax and language extensions puzzles should be easy? Think again as you deal with the perversity of the unary minus operator, and puzzles based on new extensions such as QualifiedDo. Prepare to be perplexed with Type Class puzzles on ad hoc polymorphism, deriving strategies, and record fields. Want more? Try mixing classic ambiguous type puzzles with advanced new features such as linear types.

After trying your hand at each puzzle, read through the solution to get more insight into key Haskell features, and use the references to build a reading list to dive deeper into new areas of the language.

What You Need

To run the puzzles yourself you’ll need a recent (>= 9.12.1) version of GHC and the core libraries. Puzzles that include additional libraries may require specific versions of the libraries. On macOS or Linux machines, you can use nix with the provided flake.nix and flake.lock files to get an appropriate environment with all required software at the correct versions. Windows users should be able to run puzzles by installing the appropriate Windows-native versions of GHC and the required libraries, or by using the nix flake from a Linux virtual machine.

Resources

Releases:

2025/12/18
B6.0
Added final puzzle: “Time Flies Like an Arrow.”
2025/11/27
B5.0
2025/10/27
B3.0
Added new puzzle: “A Very Nice Recipe for Soup” Reorganized some sections as the book moves closer to its final form
2025/10/15
B2.0
Added a puzzle.

Contents & Extracts

Note: Contents and extracts of beta books will change as the book is developed.

Table of Contents

  • Lazy Evaluation

    • Looking for a Needle in a Stack of Infinities
    • Haskell for Very Full Stack Developers
    • Say Cheese
    • Diving Head First into a Bottomless Pit
    • The Least You Can Possibly Do
    • Do You Even Lift?
  • Syntax and Language Extensions

  • Type Classes

    • Traversing Tuples
    • A Slightly Off-White Hat
    • If At First You Don’t Succeed, Trie, Trie Again
    • A Nice Recipe for Soup
    • Field Theory
  • The Type System

    • Round Trip Tickets
    • A Grand Un-Unified Theory
    • Non-Functional Dependencies
    • Time Flies Like an Arrow

Author

Rebecca Skinner is the author of Effective Haskell, and a software engineer with more than 10 years of experience in Haskell and functional programming across industries including fintech, security, and data science. She currently volunteers as a member of the Haskell.org committee.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $14.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal

This book is in Beta, final version expected Apr 2026

Beta Books: What do I get?

Related Titles:

About This Title

Pages: 120
Published: April 2026
ISBN: 9798888651902
Edition: 1
In Beta