{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreib27ffd7m7cspfsigwrsv7uyr4f7ge7rihcdsesf4mosxbnzsk75q",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mksq6afi3mm2"
  },
  "path": "/t/why-arent-modules-prefixed-their-package-name/14025#post_1",
  "publishedAt": "2026-05-01T16:33:40.000Z",
  "site": "https://discourse.haskell.org",
  "tags": [
    "Hazy"
  ],
  "textContent": "This follows from discussion on the Functional Programming Discord.\n\nIn Java, Python and various other languages, modules are always prefixed with their package name. For example: `import org.springframework. ...` from Java or `import pandas` from Python.\n\nWhy do Haskell packages not do this? Is it a cultural thing?\n\nFor some additional context, we where discussing this transitive package dependencies. If package `A`, depends on `B` and `B` depends on `C`, should `A` be allowed to import `C`’s modules without directly depending on `C`. I’m inclined to say yes because `B`’s types may not make sense without `C`’s types.\n\nThese transitive dependencies would cause problems if module names where not prefixed with their package name. In Java and Python, because nearly all modules are prefixed. They don’t run into this problem. I am not familiar with their language package managers to say if their dependencies are transitive, but they certainly have the option to make them so. Their language runtimes don’t allow overlapping packages names.\n\nIn Hazy, I plan making packages have transitive dependencies and I currently expect full qualified module names to be unique. I am aware that GHC allows packages to have overlapping module names but I am hesitant to allow this.",
  "title": "Why aren't modules prefixed their package name?"
}