stack new test yesod-postgres
cd test && stack build
which fails with:
Building all executables for `test' once. After a successful build of all of them, only specified executables will be rebuilt.
test-0.0.0: configure (lib + exe)
Configuring test-0.0.0...
There exist several components with the same name: 'test'. This is a bug in your .cabal file.
CallStack (from HasCallStack):
error, called at libraries/Cabal/Cabal/Distribution/PackageDescription/Utils.hs:18:15 in Cabal-2.0.1.0:Distribution.PackageDescription.Utils
stack new test produces a project that can be built.
Running
which fails with:
stack new test
produces a project that can be built.