{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreihe4ta7rtukq67hk433skp2sr4hfpyl6dgbspn3pb6plf2hldzk3e",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mkgjylghgzl2"
  },
  "path": "/t/config-languages-and-dhall/13948#post_19",
  "publishedAt": "2026-04-26T19:39:12.000Z",
  "site": "https://discourse.haskell.org",
  "tags": [
    "rel_eng: Give the ghcup yaml generation script some Python (and Nix) love (!15966) · Merge requests · Glasgow Haskell Compiler / GHC · GitLab",
    "GitLab",
    "rel_eng: Give the ghcup yaml generation script some Python (and Nix) love..."
  ],
  "textContent": "FPtje:\n\n> Perhaps a smaller change is to add typing to that Python script. I don’t see any type annotations, and quite a few nested dicts.\n>\n> Throw some dataclasses at it, or even a pydantic for good parsing/encoding, and you’ll be in a much, much better position to communicate metadata format changes. It would really just be changing the types and running your favourite Python type checker until it stops complaining. The past couple of years have seen quite a large push for typing in Python. It’s there for the taking. The script doesn’t _have_ to be sad.\n\nUpdate on this: I put my money where my mouth is and made the MR: rel_eng: Give the ghcup yaml generation script some Python (and Nix) love (!15966) · Merge requests · Glasgow Haskell Compiler / GHC · GitLab\n\nSpecifically, the declared type of the Ghcup yaml schema can be found here:\n\nGitLab\n\n### rel_eng: Give the ghcup yaml generation script some Python (and Nix) love...\n\nHi there! This is my first contribution since either a very long time, maybe even forever. I was sniped by\n\nThis is already quite an improvement, if I say so myself. ~~Note that I did cap my time on this, and the`viArch: dict[ViArch, dict[Distro, dict[VersionStr, DlInfo]]]` part can be made nicer by making more classes (instead of dictionaries).~~\n\nEdit: I decided to come back and fix that nested dict.\n\nI realize that this entire script would be superfluous if indeed replaced by e.g. nickel. I did want to demonstrate the typing capabilities of modern Python, though.",
  "title": "Config languages (and Dhall)"
}