{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreibgvkhpezqw6vww4ogywe3gh4kzjefvl4cqa5dqe537vdicyleag4",
"uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mkt5kqierxg2"
},
"path": "/t/why-arent-modules-prefixed-their-package-name/14025#post_9",
"publishedAt": "2026-05-01T21:38:58.000Z",
"site": "https://discourse.haskell.org",
"tags": [
"semigroups",
"attoparsec-aeson"
],
"textContent": "Making unprefixed module names the default has allowed for much smoother migrations when modules enter or leave major libraries. Off the top of my head, I can think of package semigroups, which incubated `Data.Semigroup` and `Data.List.NonEmpty` before they entered `base`, and package attoparsec-aeson, which holds `aeson`’s old `attoparsec`-based parse.\n\nI think it’s a useful feature, and if you plan to strictly qualify your identifiers including by package name, you might need to think about how to get similar effects in your module system.\n\nI’m a bit surprised by the amount of people who seem to be in favour of “if A depends on B depends on C, then A should be able to import from C” as a general principle. C could be an implementation detail of B, in which case A should have no right to import from C unless it also depends on it directly.",
"title": "Why aren't modules prefixed their package name?"
}