▸case-23 We are building an Elm web application using Elm Architecture (Model, Update, View). How do we handle HTTP commands and Msg updates for asynchronous API requests in Elm? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-05 We are building an embedded domain-specific language (EDSL) evaluator in Haskell for integer and boolean expressions. A basic `data Expr = ValInt Int | ValBool Bool | Add Expr Expr | If Expr Expr Expr` type requires runtime dynamic checks during evaluation. How should we represent this AST so ill-typed expressions fail at compile time? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-02 We need a Haskell function that extracts the first element of a list of strings and converts it to an integer. A junior developer suggested using `read (head xs)`. Refactor this function for a production service processing untrusted input. | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-17 We are writing a parser in Megaparsec for a configuration file. When a syntax error occurs, we need to report custom error components instead of generic failure strings. Show how to define the custom parser error component. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-06 We need to parse custom protocol headers formatted as `KEY:VALUE\n` in Haskell with precise source position reporting and modern high-performance parser combinators. Construct a parser for this format. | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-16 A Haskell application retrieves items from a configured list by index using `list !! idx`. When index is out of bounds, the application crashes at runtime. Provide a safe replacement. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-12 A Haskell pipeline calculating the sum of a list of 10,000,000 integers is crashing with high memory usage: `sumList = foldl (+) 0`. Diagnose the cause and fix it for constant-space execution. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-20 We are writing a state machine transition function `transition :: State -> Event -> State`. Some events are invalid in certain states, and currently the code calls `error "Invalid transition"`. How should this function be redesigned to be total? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-22 We are building an asynchronous web service in Rust using the Tokio runtime and Axum web framework. How should we configure thread pool size and manage state across handlers using `Arc<Mutex<T>>`? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-08 We are building a multi-account banking transfer service in Haskell where funds must be moved between two accounts atomically without deadlocks or race conditions. Show how to model this concurrent state update. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-11 We are designing a Haskell library for custom binary serialization. We want a unified interface so any user type can define how it converts to and from a binary buffer. How should we structure this capability abstraction? | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-18 We are building a CLI application in Haskell that requires accessing a read-only environment configuration, maintaining mutable app execution state, and performing logging IO. Design an idiomatic monad transformer stack for this application. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-01 We are experiencing race conditions in our worker thread pool in a backend service. Please provide a concurrent Haskell implementation using STM and async that safely updates a shared transactional map. The solution should separate pure state updates from effectful thread orchestration, include exception-safe concurrency combinators, and include a basic QuickCheck property test structure. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-21 We have a high-throughput streaming node in Haskell defined as `data Node = Node Int Text [Double]`. Profiling shows high heap retention due to thunks stored inside record fields. Refactor the datatype definition for memory efficiency. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-10 We implemented a custom string compression algorithm in Haskell with signature `compress :: Text -> Text` and `decompress :: Text -> Text`. We want to verify that `decompress (compress s) == s` holds for thousands of arbitrary inputs. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-09 In a Haskell network service, we need to run two worker tasks concurrently, wait for both to complete, and automatically cancel the other if one throws an exception. How should we structure this concurrent execution? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-19 A junior developer added 25 different language extensions to the top of a small 20-line Haskell file. What is the recommended strategy for managing language extensions in modern GHC projects? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-24 We are setting up an OCaml project using Dune build system and dune-project files. How do we configure library dependencies, module interface `.mli` files, and dune build targets for a multi-package dune workspace? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-14 We have a Haskell order validation module that reads configuration from disk, queries a database, validates discount codes, and calculates tax. The validation logic is difficult to test because IO is mixed into the validation logic. Refactor this design. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-13 We are setting up a production Cabal file for a new Haskell executable package `my-service`. How should `build-depends` and default GHC compiler options be configured for build reproducibility and code quality? | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-03 In our Haskell e-commerce backend, functions accept plain `Double` for transaction amounts and `Int` for user IDs, leading to bugs where amounts are passed as user IDs. Design a safe type representation for these domain concepts. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-04 We have an order processing pipeline in Haskell where orders move from `Unpaid` to `Paid` to `Shipped`. Currently we use a runtime `Status` enum field in a single `Order` record, requiring runtime checks everywhere. Refactor this to enforce order state transitions at compile time. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-07 Our Haskell web API uses record types like `data User = User { userId :: Int, userName :: Text }`. The REST API specification requires JSON keys `id` and `name` without the `user` prefix. Show how to configure JSON encoding/decoding using standard Haskell JSON abstractions. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-15 We need a Haskell type-level association that maps a domain payload type to its corresponding response type (e.g. `UserQuery` maps to `UserResponse`, `ItemQuery` maps to `ItemResponse`). How can we express this type relationship at compile time? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |