diff --git a/app/ghcup/BrickMain.hs b/app/ghcup/BrickMain.hs index 60ad357..c6e870c 100644 --- a/app/ghcup/BrickMain.hs +++ b/app/ghcup/BrickMain.hs @@ -27,6 +27,9 @@ import Brick.Widgets.List ( listSelectedFocusedAttr ) import Codec.Archive import Control.Exception.Safe +#if !MIN_VERSION_base(4,13,0) +import Control.Monad.Fail ( MonadFail ) +#endif import Control.Monad.Reader import Control.Monad.Trans.Except import Control.Monad.Trans.Resource diff --git a/ghcup.cabal b/ghcup.cabal index 735b9f1..09d1778 100644 --- a/ghcup.cabal +++ b/ghcup.cabal @@ -96,7 +96,7 @@ library build-depends: , aeson >=1.4 , async >=0.8 && <2.3 - , base >=4.13 && <5 + , base >=4.12 && <5 , base16-bytestring >=0.1.1.6 && <1.1 , binary ^>=0.8.6.0 , bytestring ^>=0.10 @@ -219,7 +219,7 @@ executable ghcup , aeson >=1.4 , aeson-pretty ^>=0.8.8 , async ^>=2.2.3 - , base >=4.13 && <5 + , base >=4.12 && <5 , bytestring ^>=0.10 , cabal-plan ^>=0.7.2 , containers ^>=0.6 @@ -287,7 +287,7 @@ test-suite ghcup-test -fwarn-incomplete-record-updates build-depends: - , base >=4.13 && <5 + , base >=4.12 && <5 , bytestring ^>=0.10 , containers ^>=0.6 , generic-arbitrary ^>=0.1.0 diff --git a/lib/GHCup/Platform.hs b/lib/GHCup/Platform.hs index 99092bd..146f0a1 100644 --- a/lib/GHCup/Platform.hs +++ b/lib/GHCup/Platform.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} @@ -27,6 +28,9 @@ import GHCup.Utils.Logger import GHCup.Utils.Prelude import GHCup.Utils.String.QQ +#if !MIN_VERSION_base(4,13,0) +import Control.Monad.Fail ( MonadFail ) +#endif import Control.Applicative import Control.Exception.Safe import Control.Monad diff --git a/lib/GHCup/Utils/Version/QQ.hs b/lib/GHCup/Utils/Version/QQ.hs index e16d9a8..ddd6917 100644 --- a/lib/GHCup/Utils/Version/QQ.hs +++ b/lib/GHCup/Utils/Version/QQ.hs @@ -53,6 +53,9 @@ deriving instance Data VUnit #if !MIN_VERSION_base(4,13,0) deriving instance Lift (NonEmpty Word) +deriving instance Lift (NonEmpty VChunk) +deriving instance Lift (NonEmpty MChunk) +deriving instance Lift (NonEmpty VUnit) #endif qq :: (Text -> Q Exp) -> QuasiQuoter