Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support LTS-23.1 more cleanly #1182

Merged
merged 3 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/ghcup/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import Data.Variant.Excepts
import Language.Haskell.TH
import Language.Haskell.TH.Syntax ( Quasi(qAddDependentFile) )
import Options.Applicative hiding ( style )
import Options.Applicative.Help.Pretty ( text )
import Options.Applicative.Pretty.Shim ( text )
import Prelude hiding ( appendFile )
import System.Environment
import System.Exit
Expand Down
2 changes: 1 addition & 1 deletion cabal.project.freeze
Original file line number Diff line number Diff line change
@@ -1 +1 @@
index-state: hackage.haskell.org 2024-12-01T14:17:34Z
index-state: hackage.haskell.org 2024-12-03T03:14:47Z
25 changes: 13 additions & 12 deletions ghcup.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@ common app-common-depends
, aeson-pretty ^>=0.8.8
, async ^>=2.2.3
, base >=4.12 && <5
, bytestring >=0.10 && <0.12
, bytestring >=0.10 && <0.13
, containers ^>=0.6
, deepseq ^>=1.4 || ^>=1.5
, directory ^>=1.3.6.0
, filepath >=1.4.101.0
, variant ^>=1.0
, megaparsec >=8.0.0 && <9.7
, megaparsec >=8.0.0 && <9.8
, mtl ^>=2.2 || ^>=2.3
, optics ^>=0.4
, optparse-applicative >=0.15.1.0 && <0.18
, optparse-applicative >=0.15.1.0 && <0.19
, pretty ^>=1.1.3.1
, pretty-terminal ^>=0.1.0.0
, process ^>=1.6.11.0
Expand All @@ -104,7 +104,7 @@ common app-common-depends
, template-haskell >=2.7 && <2.23
, temporary ^>=1.3
, text ^>=2.0 || ^>=2.1
, time >=1.9.3 && <1.12
, time >=1.9.3 && <1.13
, unordered-containers ^>=0.2
, uri-bytestring ^>=0.3.2.2
, utf8-string ^>=1.0
Expand All @@ -116,7 +116,7 @@ common app-common-depends
cpp-options: -DTAR
build-depends:
tar ^>=0.6.0.0
, zip ^>=2.0.0
, zip ^>=2.0.0 || ^>=2.1.0

else
build-depends: libarchive ^>=3.0.3.0
Expand Down Expand Up @@ -194,7 +194,7 @@ library
, base >=4.12 && <5
, base16-bytestring >=0.1.1.6 && <1.1
, binary ^>=0.8.6.0
, bytestring >=0.10 && <0.12
, bytestring >=0.10 && <0.13
, bz2 ^>=1.0.1.1
, Cabal ^>=3.0.0.0 || ^>=3.2.0.0 || ^>=3.4.0.0 || ^>=3.6.0.0 || ^>=3.8.0.0 || ^>= 3.10.0.0
, Cabal-syntax ^>=3.6.0.0 || ^>=3.8.0.0 || ^>= 3.10.0.0 || ^>= 3.12.0.0
Expand All @@ -212,7 +212,7 @@ library
, file-uri ^>=0.1.0.0
, variant ^>=1.0
, xz ^>=5.6.3
, megaparsec >=8.0.0 && <9.7
, megaparsec >=8.0.0 && <9.8
, mtl ^>=2.2 || ^>=2.3
, optics ^>=0.4
, os-release ^>=1.0.0
Expand All @@ -230,7 +230,7 @@ library
, temporary ^>=1.3
, terminal-size ^>=0.3.3
, text ^>=2.0 || ^>=2.1
, time >=1.9.3 && <1.12
, time >=1.9.3 && <1.13
, transformers ^>=0.5 || ^>=0.6
, unliftio-core ^>=0.2.0.1
, unordered-containers ^>=0.2.10.0
Expand All @@ -246,7 +246,7 @@ library
cpp-options: -DTAR
build-depends:
tar ^>=0.6.0.0
, zip ^>=2.0.0
, zip ^>=2.0.0 || ^>=2.1.0

else
build-depends: libarchive ^>=3.0.3.0
Expand Down Expand Up @@ -316,6 +316,7 @@ library ghcup-optparse
GHCup.OptParse.UnSet
GHCup.OptParse.Upgrade
GHCup.OptParse.Whereis
Options.Applicative.Pretty.Shim

hs-source-dirs: lib-opt
default-language: Haskell2010
Expand Down Expand Up @@ -464,19 +465,19 @@ test-suite ghcup-test

build-depends:
, base >=4.12 && <5
, bytestring >=0.10 && <0.12
, bytestring >=0.10 && <0.13
, containers ^>=0.6
, conduit ^>=1.3
, directory ^>=1.3.6.0
, filepath >=1.4.101.0
, generic-arbitrary >=0.1.0 && <0.2.1 || >=0.2.2 && <0.3
, generic-arbitrary ^>=0.1.0 || ^>=0.2.2
, ghcup
, hspec >=2.7.10 && <2.12
, hspec-golden-aeson ^>=0.9
, QuickCheck ^>=2.14.1
, quickcheck-arbitrary-adt ^>=0.3.1.0
, text ^>=2.0 || ^>=2.1
, time >=1.9.3 && <1.12
, time >=1.9.3 && <1.13
, uri-bytestring ^>=0.3.2.2
, versions >=6.0.5 && <6.1

Expand Down
2 changes: 1 addition & 1 deletion lib-opt/GHCup/OptParse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import Data.Either
import Data.Functor
import Data.Maybe
import Options.Applicative hiding ( style )
import Options.Applicative.Help.Pretty ( text )
import Options.Applicative.Pretty.Shim ( text )
import Prelude hiding ( appendFile )
import System.Exit
import System.Environment (getProgName)
Expand Down
2 changes: 1 addition & 1 deletion lib-opt/GHCup/OptParse/Compile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import qualified Data.Versions as V
import Data.Text ( Text )
import Data.Variant.Excepts
import Options.Applicative hiding ( style )
import Options.Applicative.Help.Pretty ( text, vsep )
import Options.Applicative.Pretty.Shim ( text, vsep )
import Prelude hiding ( appendFile )
import System.Exit

Expand Down
2 changes: 1 addition & 1 deletion lib-opt/GHCup/OptParse/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import Data.Functor
import Data.Maybe
import Data.Variant.Excepts
import Options.Applicative hiding ( style, ParseError )
import Options.Applicative.Help.Pretty ( text )
import Options.Applicative.Pretty.Shim ( text )
import Prelude hiding ( appendFile )
import System.Exit

Expand Down
2 changes: 1 addition & 1 deletion lib-opt/GHCup/OptParse/Install.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import Data.Functor
import Data.Maybe
import Data.Variant.Excepts
import Options.Applicative hiding ( style )
import Options.Applicative.Help.Pretty ( text )
import Options.Applicative.Pretty.Shim ( text )
import Prelude hiding ( appendFile )
import System.Exit
import URI.ByteString hiding ( uriParser )
Expand Down
2 changes: 1 addition & 1 deletion lib-opt/GHCup/OptParse/Set.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import Data.Versions
import GHC.Unicode
import Data.Variant.Excepts
import Options.Applicative hiding ( style )
import Options.Applicative.Help.Pretty ( text )
import Options.Applicative.Pretty.Shim ( text )
import Prelude hiding ( appendFile )
import System.Exit

Expand Down
2 changes: 1 addition & 1 deletion lib-opt/GHCup/OptParse/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import Data.Functor
import Data.Maybe
import Data.Variant.Excepts
import Options.Applicative hiding ( style )
import Options.Applicative.Help.Pretty ( text )
import Options.Applicative.Pretty.Shim ( text )
import Prelude hiding ( appendFile )
import System.Exit
import URI.ByteString hiding ( uriParser )
Expand Down
2 changes: 1 addition & 1 deletion lib-opt/GHCup/OptParse/UnSet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Data.Functor
import Data.Maybe
import Data.Variant.Excepts
import Options.Applicative hiding ( style )
import Options.Applicative.Help.Pretty ( text )
import Options.Applicative.Pretty.Shim ( text )
import Prelude hiding ( appendFile )
import System.Exit

Expand Down
2 changes: 1 addition & 1 deletion lib-opt/GHCup/OptParse/Whereis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import Data.Functor
import Data.Maybe
import Data.Variant.Excepts
import Options.Applicative hiding ( style )
import Options.Applicative.Help.Pretty ( text )
import Options.Applicative.Pretty.Shim ( text )
import Prelude hiding ( appendFile )
import System.Environment
import System.Exit
Expand Down
17 changes: 17 additions & 0 deletions lib-opt/Options/Applicative/Pretty/Shim.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{-# LANGUAGE CPP #-}
-- | Compatibility shim between optparse-applicative <0.18.0 and >=0.18.0
-- In moving away from ansi-wl-pprint to prettyprinter, many monomorphic
-- pretty-printers were subsumed under the polymorphic pretty :: a -> Doc ann
-- This module provides the monomorphic prettyprinters GHCup.Optparse.* use.

module Options.Applicative.Pretty.Shim (
text,
module Options.Applicative.Help.Pretty
) where

import Options.Applicative.Help.Pretty

#if MIN_VERSION_optparse_applicative(0,18,0)
text :: String -> Doc
text = pretty
#endif
31 changes: 3 additions & 28 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,18 @@
resolver: lts-22.43
resolver: lts-23.1

packages:
- .

extra-deps:
- Cabal-3.10.3.0
- Cabal-syntax-3.10.3.0
- Win32-2.14.0.0@sha256:e34af84fec733b5c0c8f052ec39499785e719e2fbbe308983adf26c82ea3704d,5942
- ansi-wl-pprint-0.6.9@sha256:fb737bc96e2aef34ad595d54ced7a73f648c521ebcb00fe0679aff45ccd49212,2448
- brick-2.1.1@sha256:ff36d64f1027eac17a14a83de053067413accb58b79e5002dce2a79cb8a3dcb3,17385
- bz2-1.0.1.1@sha256:d21b768c3d41e0cd313beb866dc003a57004ec46b95a6aaf31963603861d1383,3741
- bzip2-clib-1.0.8@sha256:f595d0b797e3990b336a36986e5537e84105d13f01f4cb8b470ef671f75555ee,1139
- chs-cabal-0.1.1.1@sha256:e8c8c1bf1dbeec64ad86d67ae6dca1c45afd644d20869546dfdcd03910d3848d,1149
- chs-deps-0.1.0.0@sha256:0cdada6d2c682c41b20331b8c63c2ecfc7e806928585195fd544c9d41f3074fd,2496
- directory-1.3.8.4@sha256:ae1730011f547153bb52139f217d1d524202b3da730a369660fc539e5dcfff31,3166
- file-uri-0.1.0.0@sha256:d6dcc12bde249362c93e413f87a41558b827333dfe3f97d953e47e1070c0da6f,1857
- filepath-1.4.300.2
- generic-arbitrary-0.2.2@sha256:202ffbf2032672a51318f2e80d7e75b72f8950e690346b4314f38bc7e39215f7,1189
- language-c-0.9.3
- libarchive-3.0.4.2
- lzma-static-5.2.5.5@sha256:55ed074cda2b82008e020a51e2f8c22f2487a58a4989ab359bf04dd6c903b894,7431
- megaparsec-9.2.2@sha256:c306a135ec25d91d252032c6128f03598a00e87ea12fcf5fc4878fdffc75c768,3219
- optparse-applicative-0.17.1.0
- os-release-1.0.2.1@sha256:2c3e8f7a9a0e17d5042d14d2036d52b42c8d5606e8d004697af462a95c87a9e2,2718
- parsec-3.1.17.0@sha256:8407cbd428d7f640a0fff8891bd2f7aca13cebe70a5e654856f8abec9a648b56,5149
- process-1.6.20.0@sha256:6630bbd3c42c2384d58d7e74d8041338f01c76def7e823afd8a08772b6c08ad3,2679
- strict-base-0.4.0.0@sha256:2ff4e43cb95eedf2995558d7fc34d19362846413dd39e6aa6a5b3ea8228fef9f,1248
- tar-0.6.3.0@sha256:e9f151d9999be8953443e730524b2792e9c0a4fb5b1463097fa1a8230870fd8a,4634
- time-1.11.1.2@sha256:a957467595420495c2dd440d9efa1f58c62277cf9438c7e7a515d7a4c65571ec,6287
- unicode-data-0.4.0.1
- unix-2.8.5.1@sha256:3f702a252a313a7bcb56e3908a14e7f9f1b40e41b7bdc8ae8a9605a1a8686f06,9808
- unix-bytestring-0.4.0.1
- variant-1.0
- versions-6.0.5
- vty-6.2@sha256:3536dc83a3fee17d9a114baf58fe47b6f080c24987266f0cd0b7b4b1fcd9cf19,3520
- vty-crossplatform-0.4.0.0@sha256:50593f91ad16777d921138475a8d2784d538fd206addd30664c620278d6c8544,3172
- vty-unix-0.2.0.0@sha256:2af3d0bdae3c4b7b7e567ee374efe32c7439fabdf9096465ce011a6c6736e9ae,2932
- vty-windows-0.2.0.2
- variant-1.0@sha256:a3c819560424f59285a09f3ebd762f3a328163d109b5da55c4c54b6626f58c97,2180
- xz-5.6.3
- zlib-0.6.3.0@sha256:96d388c95a98d6db94b74053130c00aea3c8c8ee041b5594bbe09242f1714356,5465
- xz-clib-5.6.3
- github: hasufell/uri-bytestring
commit: 4fb5ed14b500c192e6e7a97f6b2b1eb478806001
Expand Down
Loading