{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreigfnt2tewolrlwkx4n4gxta2qnjndo56yyu755mfe3s4gpbvh5r3u",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mgnrc5mnbs42"
  },
  "path": "/t/haskell-vibes-jappie/13772?page=2#post_21",
  "publishedAt": "2026-03-09T18:11:24.000Z",
  "site": "https://discourse.haskell.org",
  "tags": [
    "github.com/jappeace/plunder",
    "Store plunder level format as TOML",
    "+487 -46",
    "…",
    "Add property test for Level TOML roundtripping · jappeace/plunder@9e29d98 · GitHub"
  ],
  "textContent": "I feel you’re underestimating the “level of detail” you can work at with these things.\nI asked it to make it “to store the hardcoded level format as toml files, and add round tripping read write tests with arbitrary levels”\n\nIt halucinated this entire Level module and associated types, it looks pretty reasonable to me. (tbf it tries to copy my style).\nEven if a TilePlacement for example is redundant compared to an axial, it’s not the worst idea to have custom types for your stored format so you can have stability accross level formats.\n\nIt spend like 20 minutes on it, worked first try, I just watched movies instead.\n\ngithub.com/jappeace/plunder\n\n####  Store plunder level format as TOML\n\ncommitted 05:58PM - 07 Mar 26 UTC\n\n \n\n +487 -46 \n\nExternalize the hardcoded level definition into a TOML file loaded at runtime, e…nabling level editing without recompilation. - Add Plunder.Level module with Level/TilePlacement/TileContentDef types, TOML parsing via toml-reader, TOML pretty-printing, and a defaultLevel matching the previous hardcoded level - Add levelToGameState and gameStateToLevel conversion functions in State.hs - Replace hardcoded Endo Grid level with levelToGameState defaultLevel - Thread initial GameState through updateState/updateLogic for proper ResetGame support with loaded levels - Update Guest.hs and Plunder.hs to load level1.toml at startup - Add roundtripping tests proving parse-print-parse stability, file roundtrip, grid dimensions, tile placement, and gameState conversion - All 83 tests pass, no new warnings Prompt: Implement the plan to store plunder level format as TOML Tokens: ~110k input, ~20k output Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>\n\noh the round trip tests were a later prompt here: Add property test for Level TOML roundtripping · jappeace/plunder@9e29d98 · GitHub",
  "title": "Haskell 💜 Vibes / Jappie"
}