{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreify6phxdv6hnpm7v7meqsfdbnrq3e2qtejws24s72iybrst32brju",
"uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mk3a3hval7l2"
},
"path": "/t/why-dont-we-have-an-import-what-you-use-commandment-in-haskell/13969#post_1",
"publishedAt": "2026-04-22T09:15:53.000Z",
"site": "https://discourse.haskell.org",
"tags": [
"Haskell PVP - Leaking instances",
"Core Guidelines - SF.10: Avoid dependencies on implicitly #included names"
],
"textContent": "I’ve recently come across Haskell PVP - Leaking instances, where there’s an example of\n\n * a package C, which explicitly depends on package B, which in turns explicitly depends on package A (this means that C implicitly depends on A),\n * a breakage of package C due to a major change in A (the removal of an instance) that reflects as non-major change in B (because it doesn’t use that instance).\n\n\n\nThe conlusion,\n\n> As a pragmatic solution, for now the PVP doesn’t required a major version bump in this case and instead leaves it to package C to add a dependency on package A to handle this situation.\n\nseem to be more than pragmatic to me: when developing C, why should I _not_ explicitly state my dependency on A?\n\nI couldn’t help but thinking that that’s exactly the approach C++ uses, and that is encoded in the Core Guidelines - SF.10: Avoid dependencies on implicitly #included names. And C++ is anything but a niche/new/in-progress language, with even 5 years more than Haskell in its backpack, so its guidelines should not be dismissed lightly, imho.\n\nIs there a reason why we don’t have an _Avoid dependencies on implicitly`imported` entities_ in Haskell?\n\nBy they way, is there any centralized _Haskell Core Guidelines_ at the present time or in some roadmap?",
"title": "Why don't we have an \"`import` what you use\" commandment in Haskell?"
}