Package sets contain a mixture of things
At the moment the package sets produced by e.g. cabalProject contain:
- Attributes for every Haskell package in the package set
- Some additional things, at least
shellForandghcWithPacakges
This seems suboptimal to me, for two reasons:
- We don't control the set of names needed for 1, so we could in principle get clashes. But I'm sure nobody will ever add a package called "shellFor". Right?
- 1 and 2 are just very different kind of things. At least in my head the package set was a map-like attribute set rather than a namespace-like attribute set, so I'd expected it to be homogeneous.
This mostly just causes confusion . I spent quite a while looking for shellFor, since surely it couldn't be just mixed up in all the package attributes? But it is.
I'd prefer to have a level of indirection, e.g.
{
packages = { ... }
shellFor = ...
ghcWithPackages = ...
}
This would be a breaking change, though.
Sounds like a reasonable change. It currently matches the layout in the Nixpkgs Haskell infrastructure pkgs.haskellPackages.shellFor.
Sounds like a reasonable change. It currently matches the layout in the Nixpkgs Haskell infrastructure pkgs.haskellPackages.shellFor.
That's a very sensible reason to have it be that way. I guess I disagree with nixpkgs too ;)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I still care!
Should we drop cabalProject and rename cabalProject' to cabalProject?
I think we should drop project too. It's a minor convenience that doesn't really give you anything. Whether your project uses Stack or Cabal isn't something that changes, hence you write it once and that's it.
Should we drop cabalProject and rename cabalProject' to cabalProject?
:+1: in my book, I can't remember whether the hsPkgs inside there also has some non-package stuff in it, should check. But maybe some people like the short version.