A useful cabal command that reduces tiresome dependency version hunting on Hackage.

In your project’s Cabal file, write your dependencies without bounds at first, like this:

build-depends: base >=4.9 && <4.10,

megaparsec,

tagsoup-megaparsec

Then run cabal update & cabal build and see if it compiles.

If it compiles, run

cabal gen-bounds

And you will get nice suggestions like