diff --git a/app/ghcup/BrickMain.hs b/app/ghcup/BrickMain.hs index 60ad3576eacac53761a98ee3355a34c0d159aa70..c6e870c4da145bb2f5e453b46f5a2756eac127dd 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 735b9f19e5beb9db780c04ae949c0db409575f83..09d17784296054a9702cec169e0050b5d921bf8b 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 99092bd9fb934988d83e7b8c8cecae7d445af510..146f0a18c93a878db1ef30a38267b1646cc75323 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 e16d9a8cc9a08e7edd5a5428d4af84b5cae5ca7f..ddd6917f193f29ce78cf680ed363128d552172b8 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