diff --git a/CHANGELOG.md b/CHANGELOG.md index bcbcf43e..780ee859 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ The changelog is available [on GitHub][2]. Get current year with the respect to the current timezone. * [#446](https://github.com/kowainik/summoner/issues/446): Add README link in the `.cabal` file's description field. +* [#453](https://github.com/kowainik/summoner/issues/453): + Drop support of `GHC-7.10` in the generated projects. ## 2.0.1.1 — May 29, 2020 diff --git a/README.md b/README.md index bc1a7252..11095910 100644 --- a/README.md +++ b/README.md @@ -134,12 +134,12 @@ Features related to the structure and content of the generated projects. -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints (GHC ⩾ 8.0) + -Wredundant-constraints -fhide-source-paths (GHC ⩾ 8.2) -Wmissing-export-lists (GHC ⩾ 8.4) -Wpartial-fields (GHC ⩾ 8.4) -Wmissing-deriving-strategies (GHC ⩾ 8.8) - -Wunused-packages (GHC ⩾ 8.10) + -Wunused-packages (GHC ⩾ 8.10) ``` Besides, the following GHC options are added to the executable, tests and benchmark stanzas: @@ -469,7 +469,7 @@ Here is the list of the options that can be configured to suit your needs. If op | `fullName` | Text | Full name. | | `email` | Text | E-mail address. | | `license` | License | One of: `MIT`, `BSD2`, `BSD3`, `GPL-2`, `GPL-3`, `LGPL-2.1`, `LGPL-3`, `AGPL-3`, `Apache-2.0`, `MPL-2.0`, `None`. | -| `ghcVersions` | [GHC] | `summoner` uses default `GHC-8.10.1`. However, additionally you can specify other versions. For each version `x.y.z` the `stack-x.y.z.yaml` will be created. | +| `ghcVersions` | [GHC] | `summoner` uses default `GHC-8.10.1`. However, additionally you can specify other versions. For each version `x.y.z` the `stack-x.y.z.yaml` will be created. Use `summon show ghc` to see all supported GHC versions. | | `github` | Bool | Turn on `GitHub` integration by default? | | `gitignore` | [Text] | List of files you want added to the default `.gitignore`. (Ignored if `github = false`) | | `noUpload` | Bool | Do not upload to GitHub, but create all GitHub related files if specified (Ignored if `github = false`) | diff --git a/summoner-cli/examples/cabal-full/cabal-full.cabal b/summoner-cli/examples/cabal-full/cabal-full.cabal index 4e592bc6..21f25813 100644 --- a/summoner-cli/examples/cabal-full/cabal-full.cabal +++ b/summoner-cli/examples/cabal-full/cabal-full.cabal @@ -37,8 +37,7 @@ common common-options -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates - if impl(ghc >= 8.0) - ghc-options: -Wredundant-constraints + -Wredundant-constraints if impl(ghc >= 8.2) ghc-options: -fhide-source-paths if impl(ghc >= 8.4) diff --git a/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal b/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal index e1ecfb47..60609768 100644 --- a/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal +++ b/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal @@ -22,8 +22,7 @@ common common-options -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates - if impl(ghc >= 8.0) - ghc-options: -Wredundant-constraints + -Wredundant-constraints if impl(ghc >= 8.2) ghc-options: -fhide-source-paths if impl(ghc >= 8.4) diff --git a/summoner-cli/examples/stack-full/stack-full.cabal b/summoner-cli/examples/stack-full/stack-full.cabal index 1cd0490c..c5ae44de 100644 --- a/summoner-cli/examples/stack-full/stack-full.cabal +++ b/summoner-cli/examples/stack-full/stack-full.cabal @@ -37,8 +37,7 @@ common common-options -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates - if impl(ghc >= 8.0) - ghc-options: -Wredundant-constraints + -Wredundant-constraints if impl(ghc >= 8.2) ghc-options: -fhide-source-paths if impl(ghc >= 8.4) diff --git a/summoner-cli/src/Summoner/GhcVer.hs b/summoner-cli/src/Summoner/GhcVer.hs index 82e035df..11b70708 100644 --- a/summoner-cli/src/Summoner/GhcVer.hs +++ b/summoner-cli/src/Summoner/GhcVer.hs @@ -33,8 +33,7 @@ import qualified Text.Show as Show -- | Represents some selected set of GHC versions. data GhcVer - = Ghc7103 - | Ghc802 + = Ghc802 | Ghc822 | Ghc844 | Ghc865 @@ -45,7 +44,6 @@ data GhcVer -- | Converts 'GhcVer' into dot-separated string. showGhcVer :: GhcVer -> Text showGhcVer = \case - Ghc7103 -> "7.10.3" Ghc802 -> "8.0.2" Ghc822 -> "8.2.2" Ghc844 -> "8.4.4" @@ -65,7 +63,6 @@ parseGhcVer = inverseMap showGhcVer -- | Returns latest known LTS resolver for all GHC versions except default one. latestLts :: GhcVer -> Text latestLts = \case - Ghc7103 -> "lts-6.35" Ghc802 -> "lts-9.21" Ghc822 -> "lts-11.22" Ghc844 -> "lts-12.26" @@ -88,7 +85,6 @@ instance Show Pvp where -- | Returns base version by 'GhcVer' as 'Pvp'. baseVerPvp :: GhcVer -> Pvp baseVerPvp = \case - Ghc7103 -> Pvp 4 8 0 2 Ghc802 -> Pvp 4 9 1 0 Ghc822 -> Pvp 4 10 1 0 Ghc844 -> Pvp 4 11 1 0 diff --git a/summoner-cli/src/Summoner/Template/Cabal.hs b/summoner-cli/src/Summoner/Template/Cabal.hs index 9cc94973..9c88a77d 100644 --- a/summoner-cli/src/Summoner/Template/Cabal.hs +++ b/summoner-cli/src/Summoner/Template/Cabal.hs @@ -131,8 +131,7 @@ cabalFile Settings{..} = File (toString settingsRepo ++ ".cabal") cabalFileConte , " -Widentities" , " -Wincomplete-uni-patterns" , " -Wincomplete-record-updates" - , " if impl(ghc >= 8.0)" - , " ghc-options: -Wredundant-constraints" + , " -Wredundant-constraints" , " if impl(ghc >= 8.2)" , " ghc-options: -fhide-source-paths" , " if impl(ghc >= 8.4)" diff --git a/summoner-cli/test/Test/Golden.hs b/summoner-cli/test/Test/Golden.hs index 546db867..81019885 100644 --- a/summoner-cli/test/Test/Golden.hs +++ b/summoner-cli/test/Test/Golden.hs @@ -83,7 +83,7 @@ fullBatteries = Settings , settingsIsExe = True , settingsTest = True , settingsBench = True - , settingsTestedVersions = [Ghc802 .. defaultGHC] + , settingsTestedVersions = [minBound .. defaultGHC] , settingsPrelude = Just $ CustomPrelude "relude" "Relude" , settingsExtensions = ["ConstraintKinds", "LambdaCase", "OverloadedStrings"] , settingsGitignore = [".secret"] diff --git a/summoner-cli/test/Test/Show.hs b/summoner-cli/test/Test/Show.hs index 1299cc5c..b384d7b0 100644 --- a/summoner-cli/test/Test/Show.hs +++ b/summoner-cli/test/Test/Show.hs @@ -14,8 +14,7 @@ showCommandSpec = describe "show command golden tests" $ goldenGhcTable :: [Text] goldenGhcTable = - [ "GHC-7.10.3 base-4.8.0.2 lts-6.35" - , "GHC-8.0.2 base-4.9.1.0 lts-9.21" + [ "GHC-8.0.2 base-4.9.1.0 lts-9.21" , "GHC-8.2.2 base-4.10.1.0 lts-11.22" , "GHC-8.4.4 base-4.11.1.0 lts-12.26" , "GHC-8.6.5 base-4.12.0.0 lts-14.27"