update to ghc 9.2.5

This commit is contained in:
rhiannon morris 2022-12-30 22:00:13 +01:00
parent cd8c51097c
commit c7d51685be
3 changed files with 14 additions and 11 deletions

View File

@ -9,7 +9,7 @@ import Data.Char (isLower, isSpace, isDigit, isAlphaNum)
import Language.Haskell.TH import Language.Haskell.TH
import Language.Haskell.TH.Quote import Language.Haskell.TH.Quote
import Data.List (intersperse) import Data.List (intersperse)
import Data.Maybe (mapMaybe) import Data.Maybe (mapMaybe, fromMaybe)
import Data.Text.Lazy.Builder import Data.Text.Lazy.Builder
(Builder, fromText, fromLazyText, fromString, singleton, toLazyText) (Builder, fromText, fromLazyText, fromString, singleton, toLazyText)
import Text.Read (readMaybe) import Text.Read (readMaybe)
@ -43,7 +43,7 @@ reindentB i (toLazyText -> str) =
dropIndent = LText.drop minIndent dropIndent = LText.drop minIndent
minIndent = minIndent =
getMin $ option 0 id $ foldMap (Option . Just . Min . indentOf) ls' getMin $ fromMaybe 0 $ foldMap (Just . Min . indentOf) ls'
indentOf = go 0 where indentOf = go 0 where
go n (' ' :.. cs) = go (n + 1) cs go n (' ' :.. cs) = go (n + 1) cs
@ -69,8 +69,8 @@ chunks = reverse . go "" [] . trimEnd where
go acc cs ('$' :. rest@(d :. _)) | isDigit d = go acc cs ('$' :. rest@(d :. _)) | isDigit d =
go "" ((Var (Reindent n), var) : lit acc : cs) rest3 go "" ((Var (Reindent n), var) : lit acc : cs) rest3
where where
((read . Text.unpack -> n), '.' :. rest2) = Text.span isDigit rest (read . Text.unpack -> n, rest2) = Text.span isDigit rest
(var, rest3) = splitVar rest2 (var, rest3) = splitVar $ Text.tail rest2
-- $var: expands to that var's contents -- $var: expands to that var's contents
go acc cs ('$' :. rest) = go acc cs ('$' :. rest) =

View File

@ -18,7 +18,7 @@ import Data.Traversable
-- | e.g. only nsfw images are present for a non-nsfw page -- | e.g. only nsfw images are present for a non-nsfw page
data NoEligibleImages = NoEligibleImages {title :: !Strict.Text} newtype NoEligibleImages = NoEligibleImages {title :: Strict.Text}
deriving stock Eq deriving anyclass Exception deriving stock Eq deriving anyclass Exception
instance Show NoEligibleImages where instance Show NoEligibleImages where
@ -50,8 +50,11 @@ make' root siteName prefix nsfw _dataDir dir
let formattedDate = formatLong date let formattedDate = formatLong date
let buttonBar = makeButtonBar title $ addIds images let buttonBar = makeButtonBar title $ addIds images
let image0@(Image {path = path0, download = download0'}) : otherImages =
#all images let allImages = #all images
let image0@(Image {path = path0, download = download0'}) = head allImages
let otherImages = tail allImages
let download0 = fromMaybe (bigFile path0) download0' let download0 = fromMaybe (bigFile path0) download0'
let path0' = pageFile path0 let path0' = pageFile path0
@ -249,7 +252,7 @@ makeButtonBar title images =
<ul class="buttonbar bb-choice"> <ul class="buttonbar bb-choice">
$2.elems $2.elems
</ul> |] </ul> |]
where elems = map (\(img,i) -> altButton img i) imgs where elems = map (uncurry altButton) imgs
skipAll = skipAll =
if any (isJust . #warning . fst) images then if any (isJust . #warning . fst) images then
[b|@0 [b|@0

View File

@ -61,8 +61,8 @@ executable make-pages
TransformListComp, TransformListComp,
TypeApplications TypeApplications
build-depends: build-depends:
base >= 4.12.0.0 && < 4.15, base ^>= 4.16.4,
bytestring ^>= 0.10.8.2, bytestring ^>= 0.11.3.1,
containers ^>= 0.6.0.1, containers ^>= 0.6.0.1,
filemanip ^>= 0.3.6.3, filemanip ^>= 0.3.6.3,
filepath ^>= 1.4.2.1, filepath ^>= 1.4.2.1,
@ -70,7 +70,7 @@ executable make-pages
HsYAML ^>= 0.2.1.0, HsYAML ^>= 0.2.1.0,
optparse-applicative ^>= 0.15.1.0, optparse-applicative ^>= 0.15.1.0,
process ^>= 1.6.8.2, process ^>= 1.6.8.2,
template-haskell ^>= 2.16.0.0, template-haskell ^>= 2.18.0.0,
text ^>= 1.2.3.1, text ^>= 1.2.3.1,
time >= 1.8.0.2 && < 1.10, time >= 1.8.0.2 && < 1.10,
unordered-containers ^>= 0.2.11.0 unordered-containers ^>= 0.2.11.0