Skip to content

Commit

Permalink
[#539] Support GHC 9.0 in generated projects
Browse files Browse the repository at this point in the history
Resolves #539
  • Loading branch information
vrom911 committed Jan 11, 2022
1 parent 3dcab67 commit 34e52b0
Show file tree
Hide file tree
Showing 61 changed files with 106 additions and 76 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- "8.6.5"
- "8.8.4"
- "8.10.7"
- "9.0.1"
- "9.0.2"
exclude:
- os: macOS-latest
ghc: 8.10.7
Expand Down Expand Up @@ -86,21 +86,21 @@ jobs:
echo "packages: ." > cabal.project
cabal build all
- if: matrix.ghc != '9.0.1'
- if: matrix.ghc != '9.0.2'
name: Build 'cabal-full'
run: |
cd "summoner-cli/examples/cabal-full/"
echo "packages: ." > cabal.project
cabal build all
- if: matrix.ghc != '9.0.1'
- if: matrix.ghc != '9.0.2'
name: Build 'stack-full'
run: |
cd "summoner-cli/examples/stack-full/"
echo "packages: ." > cabal.project
cabal build all
- if: matrix.ghc != '9.0.1'
- if: matrix.ghc != '9.0.2'
name: Build 'full-batteries'
run: |
cd "summoner-cli/examples/full-batteries/"
Expand All @@ -113,7 +113,7 @@ jobs:
strategy:
matrix:
stack: ["2.5"]
ghc: ["8.10.7"]
ghc: ["9.0.2"]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,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.7`. 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. |
| `ghcVersions` | [GHC] | `summoner` uses default `GHC-9.0.2`. 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
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-18.10
resolver: nightly-2022-01-10

packages:
- summoner-cli/
Expand Down
5 changes: 5 additions & 0 deletions summoner-cli/examples/cabal-full/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,18 @@ jobs:
- "8.6.5"
- "8.8.4"
- "8.10.7"
- "9.0.2"
exclude:
- os: macOS-latest
ghc: 8.10.7
- os: macOS-latest
ghc: 8.8.4
- os: macOS-latest
ghc: 8.6.5
- os: macOS-latest
ghc: 8.4.4
- os: windows-latest
ghc: 8.10.7
- os: windows-latest
ghc: 8.8.4
- os: windows-latest
Expand Down
1 change: 1 addition & 0 deletions summoner-cli/examples/cabal-full/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- ghc: 8.6.5
- ghc: 8.8.4
- ghc: 8.10.7
- ghc: 9.0.2

install:
# HLint check
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/examples/cabal-full/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2021, Kowainik
Copyright (c) 2022, Kowainik
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
4 changes: 2 additions & 2 deletions summoner-cli/examples/cabal-full/appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ environment:
CABOPTS: --store-dir=C:\\SR

matrix:
- GHCVER: 8.10.7
- GHCVER: 9.0.2

install:
- choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2
- choco install -y cabal --version 2.4.1.0
- choco install -y ghc --version 8.10.7
- choco install -y ghc --version 9.0.2
- refreshenv

before_build:
Expand Down
5 changes: 3 additions & 2 deletions summoner-cli/examples/cabal-full/cabal-full.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license: BSD-3-Clause
license-file: LICENSE
author: Kowainik
maintainer: Kowainik <[email protected]>
copyright: 2021 Kowainik
copyright: 2022 Kowainik
category: Testing
build-type: Simple
extra-doc-files: README.md
Expand All @@ -20,13 +20,14 @@ tested-with: GHC == 8.4.4
GHC == 8.6.5
GHC == 8.8.4
GHC == 8.10.7
GHC == 9.0.2

source-repository head
type: git
location: https://github.com/kowainik/cabal-full.git

common common-options
build-depends: base >= 4.11.1.0 && < 4.15
build-depends: base >= 4.11.1.0 && < 4.16
, relude

mixins: base hiding (Prelude)
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/examples/cabal-full/src/CabalFull.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{- |
Copyright: (c) 2021 Kowainik
Copyright: (c) 2022 Kowainik
SPDX-License-Identifier: BSD-3-Clause
Maintainer: Kowainik <[email protected]>
Expand Down
6 changes: 3 additions & 3 deletions summoner-cli/examples/cabal-minimal/cabal-minimal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ description:
license: NONE
author: Kowainik
maintainer: Kowainik <[email protected]>
copyright: 2021 Kowainik
copyright: 2022 Kowainik
build-type: Simple
extra-doc-files: README.md
CHANGELOG.md
tested-with: GHC == 8.10.7
tested-with: GHC == 9.0.2

common common-options
build-depends: base ^>= 4.14.3.0
build-depends: base ^>= 4.15.1.0

ghc-options: -Wall
-Wcompat
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/examples/cabalScript.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env cabal
{- cabal:
build-depends:
, base ^>= 4.14.3.0
, base ^>= 4.15.1.0
-}

main :: IO ()
Expand Down
6 changes: 6 additions & 0 deletions summoner-cli/examples/full-batteries/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ jobs:
- "8.6.5"
- "8.8.4"
- "8.10.7"
- "9.0.2"
exclude:
- os: macOS-latest
ghc: 8.10.7
- os: macOS-latest
ghc: 8.8.4
- os: macOS-latest
Expand All @@ -32,6 +35,8 @@ jobs:
ghc: 8.2.2
- os: macOS-latest
ghc: 8.0.2
- os: windows-latest
ghc: 8.10.7
- os: windows-latest
ghc: 8.8.4
- os: windows-latest
Expand Down Expand Up @@ -86,6 +91,7 @@ jobs:
- "8.6.5"
- "8.8.4"
- "8.10.7"
- "9.0.2"

steps:
- uses: actions/[email protected]
Expand Down
4 changes: 4 additions & 0 deletions summoner-cli/examples/full-batteries/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- ghc: 8.6.5
- ghc: 8.8.4
- ghc: 8.10.7
- ghc: 9.0.2

- ghc: 8.0.2
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-8.0.2.yaml"
Expand All @@ -36,6 +37,9 @@ jobs:
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-8.8.4.yaml"

- ghc: 8.10.7
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-8.10.7.yaml"

- ghc: 9.0.2
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack.yaml"

allow_failures:
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/examples/full-batteries/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Kowainik
Copyright (c) 2022 Kowainik

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions summoner-cli/examples/full-batteries/appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ environment:
CABOPTS: --store-dir=C:\\SR

matrix:
- GHCVER: 8.10.7
- GHCVER: 9.0.2

install:
- choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2
- choco install -y cabal --version 2.4.1.0
- choco install -y ghc --version 8.10.7
- choco install -y ghc --version 9.0.2
- refreshenv

before_build:
Expand Down
5 changes: 3 additions & 2 deletions summoner-cli/examples/full-batteries/full-batteries.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license: MIT
license-file: LICENSE
author: Kowainik
maintainer: Kowainik <[email protected]>
copyright: 2021 Kowainik
copyright: 2022 Kowainik
category: Testing
build-type: Simple
extra-doc-files: README.md
Expand All @@ -22,13 +22,14 @@ tested-with: GHC == 8.0.2
GHC == 8.6.5
GHC == 8.8.4
GHC == 8.10.7
GHC == 9.0.2

source-repository head
type: git
location: https://github.com/kowainik/full-batteries.git

common common-options
build-depends: base >= 4.9.1.0 && < 4.15
build-depends: base >= 4.9.1.0 && < 4.16
, relude

mixins: base hiding (Prelude)
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/examples/full-batteries/src/FullBatteries.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{- |
Copyright: (c) 2021 Kowainik
Copyright: (c) 2022 Kowainik
SPDX-License-Identifier: MIT
Maintainer: Kowainik <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions summoner-cli/examples/full-batteries/stack-8.10.7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-18.10
2 changes: 1 addition & 1 deletion summoner-cli/examples/full-batteries/stack.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
resolver: lts-18.10
resolver: nightly-2022-01-10
1 change: 1 addition & 0 deletions summoner-cli/examples/stack-full/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- "8.6.5"
- "8.8.4"
- "8.10.7"
- "9.0.2"

steps:
- uses: actions/[email protected]
Expand Down
3 changes: 3 additions & 0 deletions summoner-cli/examples/stack-full/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-8.8.4.yaml"

- ghc: 8.10.7
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-8.10.7.yaml"

- ghc: 9.0.2
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack.yaml"

allow_failures:
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/examples/stack-full/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2021, Kowainik
Copyright (c) 2022, Kowainik
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/examples/stack-full/src/StackFull.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{- |
Copyright: (c) 2021 Kowainik
Copyright: (c) 2022 Kowainik
SPDX-License-Identifier: BSD-3-Clause
Maintainer: Kowainik <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions summoner-cli/examples/stack-full/stack-8.10.7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-18.10
5 changes: 3 additions & 2 deletions summoner-cli/examples/stack-full/stack-full.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license: BSD-3-Clause
license-file: LICENSE
author: Kowainik
maintainer: Kowainik <[email protected]>
copyright: 2021 Kowainik
copyright: 2022 Kowainik
category: Testing
build-type: Simple
extra-doc-files: README.md
Expand All @@ -20,13 +20,14 @@ tested-with: GHC == 8.4.4
GHC == 8.6.5
GHC == 8.8.4
GHC == 8.10.7
GHC == 9.0.2

source-repository head
type: git
location: https://github.com/kowainik/stack-full.git

common common-options
build-depends: base >= 4.11.1.0 && < 4.15
build-depends: base >= 4.11.1.0 && < 4.16
, relude

mixins: base hiding (Prelude)
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/examples/stack-full/stack.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
resolver: lts-18.10
resolver: nightly-2022-01-10
2 changes: 1 addition & 1 deletion summoner-cli/examples/stackScript.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env stack
{- stack
--resolver lts-18.10
--resolver nightly-2022-01-10
script
--package base
-}
Expand Down
4 changes: 2 additions & 2 deletions summoner-cli/examples/summoner-default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ license = "MIT"
# travis = true # Travis CI
# appveyor = true # AppVeyor CI

# List of additional GHC versions to support besides 8.10.7.
# List of additional GHC versions to support besides 9.0.2.
# Run the 'summon show ghc' command to see the list of all supported GHC versions.
# ghcVersions = ["8.6.5", "8.8.4"]
# ghcVersions = ["8.8.4", "8.10.7"]

# List of default-extensions in the .cabal file
# extensions = [ "ConstraintKinds"
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/src/Summoner.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{- |
Module : Summoner
Copyright : (c) 2017-2021 Kowainik
Copyright : (c) 2017-2022 Kowainik
SPDX-License-Identifier : MPL-2.0
Maintainer : Kowainik <[email protected]>
Stability : Stable
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/src/Summoner/CLI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{- |
Module : Summoner.CLI
Copyright : (c) 2017-2021 Kowainik
Copyright : (c) 2017-2022 Kowainik
SPDX-License-Identifier : MPL-2.0
Maintainer : Kowainik <[email protected]>
Stability : Stable
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/src/Summoner/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

{- |
Module : Summoner.Config
Copyright : (c) 2017-2021 Kowainik
Copyright : (c) 2017-2022 Kowainik
SPDX-License-Identifier : MPL-2.0
Maintainer : Kowainik <[email protected]>
Stability : Stable
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/src/Summoner/CustomPrelude.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{- |
Module : Summoner.CustomPrelude
Copyright : (c) 2017-2021 Kowainik
Copyright : (c) 2017-2022 Kowainik
SPDX-License-Identifier : MPL-2.0
Maintainer : Kowainik <[email protected]>
Stability : Stable
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/src/Summoner/Decision.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{- |
Module : Summoner.Decision
Copyright : (c) 2017-2021 Kowainik
Copyright : (c) 2017-2022 Kowainik
SPDX-License-Identifier : MPL-2.0
Maintainer : Kowainik <[email protected]>
Stability : Stable
Expand Down
Loading

0 comments on commit 34e52b0

Please sign in to comment.