Skip to content

Commit

Permalink
Compatibility with GHC 9.10 (#1036)
Browse files Browse the repository at this point in the history
* Compatibility with GHC 9.10

Bump the upper bound on template-haskell and
enable CI for GHC-9.10.1.

* Fix "unused `foldl'` import" on GHC 9.10

...without breaking older compilers.

---------

Co-authored-by: Alexander Batischev <[email protected]>
  • Loading branch information
BinderDavid and Minoru authored Jul 5, 2024
1 parent ace3ad8 commit 67f4f8b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- "9.4.8"
- "9.6.5"
- "9.8.2"
- "9.10.1"
exclude:
# fails to build: "can't load framework: Cocoa (not found)"
- os: macOS-12
Expand Down
2 changes: 1 addition & 1 deletion hakyll.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ Library
resourcet >= 1.1 && < 1.4,
scientific >= 0.3.4 && < 0.4,
tagsoup >= 0.13.1 && < 0.15,
template-haskell >= 2.14 && < 2.22,
template-haskell >= 2.14 && < 2.23,
text >= 0.11 && < 1.3 || >= 2.0 && < 2.2,
time >= 1.8 && < 1.15,
time-locale-compat >= 0.1 && < 0.2,
Expand Down
6 changes: 5 additions & 1 deletion lib/Hakyll/Core/Runtime.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--------------------------------------------------------------------------------
{-# LANGUAGE CPP #-}
{-# LANGUAGE RecordWildCards #-}
module Hakyll.Core.Runtime
( run
Expand All @@ -18,7 +19,10 @@ import Data.Foldable (for_, traverse_)
import qualified Data.Graph as Graph
import Data.IORef (IORef)
import qualified Data.IORef as IORef
import Data.List (foldl', intercalate)
import Data.List (intercalate)
#if !(MIN_VERSION_base(4,20,0))
import Data.List (foldl')
#endif
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Maybe (fromMaybe)
Expand Down
6 changes: 5 additions & 1 deletion src/Init.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--------------------------------------------------------------------------------
{-# LANGUAGE CPP #-}
module Main
( main
) where
Expand All @@ -8,7 +9,10 @@ module Main
import Control.Arrow (first)
import Control.Monad (forM, forM_)
import Data.Char (isAlphaNum, isNumber)
import Data.List (foldl', intercalate, isPrefixOf)
import Data.List (intercalate, isPrefixOf)
#if !(MIN_VERSION_base(4,20,0))
import Data.List (foldl')
#endif
import Data.Version (Version (..))
import System.Directory (canonicalizePath, copyFile,
doesFileExist,
Expand Down

0 comments on commit 67f4f8b

Please sign in to comment.