Hi all,

I'm working on a library for fast sorting of MArrays. The library is primarily about speed, so I added

    ghc-options: -O2

to the cabal file. Now cabal sdist complains with:

    'ghc-options: -O2' is rarely needed. Check that it is giving a real benefit and not just imposing longer compile times on your users.

I wonder:

(1) Is there a way how to disable the warning? As the main aim of the library is speed, I believe -O2 is appropriate here. And since the code is quite short, I'm quite sure the increased compile time won't be noticeable.

(2) Why does cabal complain about it at the first place? I found a reference saying the warning is adequate:
https://github.com/haskell/cabal/issues/808
but not saying why. Maybe for complex programs -O2 prolongs compile time too much, but libraries are usually compiled once and used many times, so using -O2 for them seems reasonable in many cases.

  Thanks for help,
  Petr Pudlak