From c3ce1ab513d07e9b29e9f4ec8244903441a03fca Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Wed, 10 Jan 2024 20:38:16 +0100 Subject: [PATCH] Allow building with Stackage LTS-22 - Lift upper bounds on skylighting, json and hoauth2 which need no further changes - mtl >= 2.3 removed a lot of re-exports which needs quite a bit of import shuffling --- gitit.cabal | 6 +++--- gitit.hs | 2 +- src/Network/Gitit.hs | 1 + src/Network/Gitit/Authentication/Github.hs | 1 + src/Network/Gitit/ContentTransformer.hs | 1 + src/Network/Gitit/Handlers.hs | 1 + src/Network/Gitit/Server.hs | 2 +- src/Network/Gitit/State.hs | 2 ++ src/Network/Gitit/Types.hs | 4 ++-- 9 files changed, 13 insertions(+), 7 deletions(-) diff --git a/gitit.cabal b/gitit.cabal index 877c25a1f..80af74a9d 100644 --- a/gitit.cabal +++ b/gitit.cabal @@ -136,7 +136,7 @@ Library temporary, pandoc >= 2.9 && < 2.20 || >= 3.0 && < 3.2, pandoc-types >= 1.20 && < 1.24, - skylighting >= 0.8.2.3 && < 0.14, + skylighting >= 0.8.2.3 && < 0.15, bytestring, text, random, @@ -160,10 +160,10 @@ Library xss-sanitize >= 0.3 && < 0.4, tagsoup >= 0.13 && < 0.15, blaze-html >= 0.4 && < 0.10, - json >= 0.4 && < 0.11, + json >= 0.4 && < 0.12, uri-bytestring >= 0.2.3.3, split, - hoauth2 >= 2.3.0 && < 2.9, + hoauth2 >= 2.3.0 && < 2.11, xml-conduit >= 1.5 && < 1.10, http-conduit >= 2.1.6 && < 2.4, http-client-tls >= 0.2.2 && < 0.4, diff --git a/gitit.hs b/gitit.hs index cb0a4ceb9..2f9d6203e 100644 --- a/gitit.hs +++ b/gitit.hs @@ -26,7 +26,7 @@ import System.Directory import Data.Maybe (isNothing) import Data.Text.Encoding (encodeUtf8) import Network.Gitit.Compat.Except() -import Control.Monad.Reader +import Control.Monad import System.Log.Logger (Priority(..), setLevel, setHandlers, getLogger, saveGlobalLogger) import System.Log.Handler.Simple (fileHandler) diff --git a/src/Network/Gitit.hs b/src/Network/Gitit.hs index 3ad25f861..57d8f2270 100644 --- a/src/Network/Gitit.hs +++ b/src/Network/Gitit.hs @@ -121,6 +121,7 @@ import Network.Gitit.ContentTransformer import Network.Gitit.Page import Network.Gitit.Authentication (loginUserForm) import Paths_gitit (getDataFileName) +import Control.Monad import Control.Monad.Reader import Prelude hiding (readFile) import qualified Data.ByteString.Char8 as B diff --git a/src/Network/Gitit/Authentication/Github.hs b/src/Network/Gitit/Authentication/Github.hs index 0fd7db15a..3829ada33 100644 --- a/src/Network/Gitit/Authentication/Github.hs +++ b/src/Network/Gitit/Authentication/Github.hs @@ -23,6 +23,7 @@ import Data.Aeson import Data.Text (Text, pack, unpack) import Data.Text.Encoding (encodeUtf8) import Control.Applicative +import Control.Monad ((>=>)) import Control.Monad.Trans (liftIO) import Data.UUID (toString) import Data.UUID.V4 (nextRandom) diff --git a/src/Network/Gitit/ContentTransformer.hs b/src/Network/Gitit/ContentTransformer.hs index 12e450a83..b97dfb7c8 100644 --- a/src/Network/Gitit/ContentTransformer.hs +++ b/src/Network/Gitit/ContentTransformer.hs @@ -69,6 +69,7 @@ module Network.Gitit.ContentTransformer where import qualified Control.Exception as E +import Control.Monad import Control.Monad.State import Control.Monad.Reader (ask) import Control.Monad.Except (throwError) diff --git a/src/Network/Gitit/Handlers.hs b/src/Network/Gitit/Handlers.hs index 44b19fe1f..dfc75a006 100644 --- a/src/Network/Gitit/Handlers.hs +++ b/src/Network/Gitit/Handlers.hs @@ -72,6 +72,7 @@ import Data.List.Split (wordsBy) import Data.Maybe (fromMaybe, mapMaybe, isJust, catMaybes) import Data.Ord (comparing) import Data.Char (toLower, isSpace) +import Control.Monad import Control.Monad.Reader import qualified Data.ByteString.Lazy as B import qualified Data.ByteString as S diff --git a/src/Network/Gitit/Server.hs b/src/Network/Gitit/Server.hs index b4746f0ed..aa2f7c734 100644 --- a/src/Network/Gitit/Server.hs +++ b/src/Network/Gitit/Server.hs @@ -37,7 +37,7 @@ where import Happstack.Server import Happstack.Server.Compression (compressedResponseFilter) import Network.Socket (getAddrInfo, defaultHints, addrAddress) -import Control.Monad.Reader +import Control.Monad (liftM) import Data.ByteString.UTF8 as U hiding (lines) withExpiresHeaders :: ServerMonad m => m Response -> m Response diff --git a/src/Network/Gitit/State.hs b/src/Network/Gitit/State.hs index 40da100b0..aef2e3ea3 100644 --- a/src/Network/Gitit/State.hs +++ b/src/Network/Gitit/State.hs @@ -28,6 +28,8 @@ import Data.Digest.Pure.SHA (sha512, showDigest) import qualified Data.ByteString.Lazy.UTF8 as L (fromString) import Data.IORef import System.IO.Unsafe (unsafePerformIO) +import Control.Monad (liftM, replicateM) +import Control.Monad.IO.Class import Control.Monad.Reader import Data.FileStore import Data.List (intercalate) diff --git a/src/Network/Gitit/Types.hs b/src/Network/Gitit/Types.hs index aa23ec1e1..57bdd76bb 100644 --- a/src/Network/Gitit/Types.hs +++ b/src/Network/Gitit/Types.hs @@ -65,9 +65,9 @@ module Network.Gitit.Types ( , org , githubConfig) where -import Control.Monad.Reader (ReaderT, runReaderT, mplus) +import Control.Monad.Reader (ReaderT, runReaderT) import Control.Monad.State (StateT, runStateT, get, modify) -import Control.Monad (liftM) +import Control.Monad (liftM, mplus) import System.Log.Logger (Priority(..)) import Text.Pandoc.Definition (Pandoc) import Text.XHtml (Html)