update to ghc 9.2.5
This commit is contained in:
parent
cd8c51097c
commit
c7d51685be
3 changed files with 14 additions and 11 deletions
|
@ -9,7 +9,7 @@ import Data.Char (isLower, isSpace, isDigit, isAlphaNum)
|
|||
import Language.Haskell.TH
|
||||
import Language.Haskell.TH.Quote
|
||||
import Data.List (intersperse)
|
||||
import Data.Maybe (mapMaybe)
|
||||
import Data.Maybe (mapMaybe, fromMaybe)
|
||||
import Data.Text.Lazy.Builder
|
||||
(Builder, fromText, fromLazyText, fromString, singleton, toLazyText)
|
||||
import Text.Read (readMaybe)
|
||||
|
@ -43,7 +43,7 @@ reindentB i (toLazyText -> str) =
|
|||
dropIndent = LText.drop minIndent
|
||||
|
||||
minIndent =
|
||||
getMin $ option 0 id $ foldMap (Option . Just . Min . indentOf) ls'
|
||||
getMin $ fromMaybe 0 $ foldMap (Just . Min . indentOf) ls'
|
||||
|
||||
indentOf = go 0 where
|
||||
go n (' ' :.. cs) = go (n + 1) cs
|
||||
|
@ -69,8 +69,8 @@ chunks = reverse . go "" [] . trimEnd where
|
|||
go acc cs ('$' :. rest@(d :. _)) | isDigit d =
|
||||
go "" ((Var (Reindent n), var) : lit acc : cs) rest3
|
||||
where
|
||||
((read . Text.unpack -> n), '.' :. rest2) = Text.span isDigit rest
|
||||
(var, rest3) = splitVar rest2
|
||||
(read . Text.unpack -> n, rest2) = Text.span isDigit rest
|
||||
(var, rest3) = splitVar $ Text.tail rest2
|
||||
|
||||
-- $var: expands to that var's contents
|
||||
go acc cs ('$' :. rest) =
|
||||
|
|
|
@ -18,7 +18,7 @@ import Data.Traversable
|
|||
|
||||
|
||||
-- | 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
|
||||
|
||||
instance Show NoEligibleImages where
|
||||
|
@ -50,8 +50,11 @@ make' root siteName prefix nsfw _dataDir dir
|
|||
let formattedDate = formatLong date
|
||||
|
||||
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 path0' = pageFile path0
|
||||
|
||||
|
@ -249,7 +252,7 @@ makeButtonBar title images =
|
|||
<ul class="buttonbar bb-choice">
|
||||
$2.elems
|
||||
</ul> |]
|
||||
where elems = map (\(img,i) -> altButton img i) imgs
|
||||
where elems = map (uncurry altButton) imgs
|
||||
skipAll =
|
||||
if any (isJust . #warning . fst) images then
|
||||
[b|@0
|
||||
|
|
|
@ -61,8 +61,8 @@ executable make-pages
|
|||
TransformListComp,
|
||||
TypeApplications
|
||||
build-depends:
|
||||
base >= 4.12.0.0 && < 4.15,
|
||||
bytestring ^>= 0.10.8.2,
|
||||
base ^>= 4.16.4,
|
||||
bytestring ^>= 0.11.3.1,
|
||||
containers ^>= 0.6.0.1,
|
||||
filemanip ^>= 0.3.6.3,
|
||||
filepath ^>= 1.4.2.1,
|
||||
|
@ -70,7 +70,7 @@ executable make-pages
|
|||
HsYAML ^>= 0.2.1.0,
|
||||
optparse-applicative ^>= 0.15.1.0,
|
||||
process ^>= 1.6.8.2,
|
||||
template-haskell ^>= 2.16.0.0,
|
||||
template-haskell ^>= 2.18.0.0,
|
||||
text ^>= 1.2.3.1,
|
||||
time >= 1.8.0.2 && < 1.10,
|
||||
unordered-containers ^>= 0.2.11.0
|
||||
|
|
Loading…
Reference in a new issue