{
  "id": 21889376,
  "title": "Make the Plan a Value",
  "url": "https://urgent.news/2026/11/26/make-the-plan-a-value",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-26T00:12:06.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://jackkelly.name/blog/archives/2026/11/26/make_the_plan_a_value"
  },
  "original_language": "en",
  "account": "The article discusses how the author implemented idempotency tokens in the Amazonka Haskell AWS SDK. To achieve this, they introduced a \"plan\" concept, separating the decision-making process from the execution phase. This decoupling simplifies testing and makes the codebase more manageable. The author likens this approach to the \"plan-execute\" pattern and \"routing slip\" integration pattern. They introduce a Config record and a function called instanceD to build Haskell code from this plan type. The generator's logic was refactored incrementally, starting with response parsing. The idea is to keep a \"do it the old way\" constructor in the plan type until the old method has been refactored. This technique allows for alternate consumers of the plan, such as testability, --dry-run, and simpler executors. The author also highlights that Haskell's laziness makes this approach particularly convenient, but the benefits apply to other languages as well.",
  "summary": null,
  "key_points": [
    "Author introduces \"plan\" concept to separate decision-making from execution.",
    "Config record and instanceD function used to build Haskell code from plan type.",
    "Haskell's laziness makes idempotency implementation particularly convenient."
  ],
  "editors_take": "Decoupling decision-making from execution through a plan-based architecture simplifies testing and allows for safer, incremental refactoring of complex SDK logic without disrupting existing implementation patterns.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}