• Oleg Grenrus's avatar
    Improve `cabal init` code a bit · 2fa83023
    Oleg Grenrus authored
    - Always ask for SPDX expression, we can "convert" them to old format
    - No default license
    - Add cabal-version: 3.0 to the list
    - cabal-version is asked using CabalSpecVersion type
    - seems to fix what #6619 tries to fix:
    
    ```
    % /code/shared-haskell/cabal/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-install-3.3.0.0/x/cabal/build/cabal/cabal init -l 'FOO AND BAR'
    Cannot parse license: FOO AND BAR
    CallStack (from HasCallStack):
      error, called at ./Distribution/ReadE.hs:42:24 in Cabal-3.3.0.0-inplace:Distribution.ReadE
    ```
    
    an error, but it doesn't loop.
    2fa83023
Defaults.hs 920 Bytes