A good part of stack.yaml and project.cabal are generated automatically by cabal init and stack init, respectively.
When I edit the source of the project, some of these entries may need to change drastically.
In particular, the dependencies in stack.yaml and project.cabal and the project.cabal entries other-extensions and exposed-modules should be updated automatically.
How do I do this automatically without clobber?