nikita-volkov / stm-containers

Containers for STM
http://hackage.haskell.org/package/stm-containers
MIT License
67 stars 13 forks source link

Moving debug dependencies to a flag #1

Closed bergmark closed 8 years ago

bergmark commented 10 years ago

There's no reason for a normal user of stm-containers to have to pull in loch-th and placeholders as far as I can tell. One solution is to add a devel flag that includes these dependencies, another one is to develop with ghci so you don't have to care about what's in the cabal file.

What do you think? I can make a PR if you'd like.

nikita-volkov commented 10 years ago

I honestly see no problem here. It's not like I depend on "lens", which brings in a transitive dependency to a whole ecosystem of packages. Both "loch-th" and "placeholders" are very lightweight and I simply consider them as part of what "base" should be and use them in every project of mine.

Besides, not both of those libraries are intended for the development cycle. "loch-th" provides a location-emitting alternative to the standard error function. Hence it's a better idea to use it instead of error, when implementing partial functions, in production too.

I need to be convinced.

mitchellwrosen commented 8 years ago

I agree with @bergmark that these dependencies should be hidden behind a Cabal flag, in the spirit of keeping packages as lightweight as possible. In fact, the project compiles fine without them right now.

nikita-volkov commented 8 years ago

Okay. I've removed the deps