Changing cabal init to be threaded by default

I just put this up: cabal init should include common options with GHC options, with -threaded and "with-rtsopts=-N" by default. · Issue #9363 · haskell/cabal · GitHub

The suggestion is to set up a common options field, which executables and libraries include by default, and to include -threaded “-with-rtsopts=-N”.

Let me know what you think here or in the thread; I promised putting out a PR in 2 weeks if Cabal maintainers like the idea.

1 Like

See also #16126: Make -threaded the default · Issues · Glasgow Haskell Compiler / GHC · GitLab.

3 Likes

We could just implement it now, then drop the -threaded (but not “with-rtsopts=-N”) once GHC moves, because the GHC issue was approved, but, ummm, is taking a while because of the need to make sure the test suite works.

On the cabal-level, this is pretty brain-dead (I mean this positively) and breaks a lot less than on the GHC level.

In either case, having common options: with a ghc-options field makes things a bit more transparent to the end user…