Skip to content

Commit

Permalink
[#453] Drop GHC-7.10 support (#490)
Browse files Browse the repository at this point in the history
* [#453] Drop GHC-7.10 support

Resolves #453

* Dummy commit to trigger appveyor
  • Loading branch information
vrom911 authored Jul 15, 2020
1 parent b74101f commit 915ad37
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 19 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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`) |
Expand Down
3 changes: 1 addition & 2 deletions summoner-cli/examples/cabal-full/cabal-full.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions summoner-cli/examples/cabal-minimal/cabal-minimal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions summoner-cli/examples/stack-full/stack-full.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 1 addition & 5 deletions summoner-cli/src/Summoner/GhcVer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions summoner-cli/src/Summoner/Template/Cabal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/test/Test/Golden.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
3 changes: 1 addition & 2 deletions summoner-cli/test/Test/Show.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 915ad37

Please sign in to comment.