I use relude as Prelude alternative in my projects.
So my cabal files look like:
build-depends: base ^>=4.18
, relude ^>=1.2
mixins: base hiding (Prelude)
, relude (Relude as Prelude)
, relude
Is is possible to set some sort of user configuration in cabal to automatically configure my .cabal files like this one when I run cabal init? I’d like to set some default-extensions as well.
I played a little with cabal user-config but it seems there is no means of doing that.
Another question
Is there any tool I can call from commad line to add a package in my project’s .cabal file (maybe with version bounds) such that I can type in something like cabal add time aeson and I get my .cabal file updated like this?
build-depends: base ^>=4.18
, relude ^>=1.2
, time ^>=1.12
, aeson ^>=2.2
I think cabal init should be outsourced to a standalone tool, for example summoner. Unfortunately, that is no longer maintained, so my pull request to update it to newer GHC/Stack/Cabal versions has been stuck on GitHub for a long time.
Edit: thanks to @tomjaguarpaw my pull request has been merged and it will hopefully be uploaded to hackage in a few weeks.