@@ -65,7 +65,7 @@ import Control.Monad
6565import Control.Monad.State.Strict
6666import Data.Char (isSpace)
6767import Data.Foldable (toList)
68−import Data.List (intersperse)
68+import Data.List (intersperse, foldl')
6969import Data.Sequence (Seq, ViewL (..), fromList, mapWithIndex, singleton, viewl,
7070 (<|))
7171import qualified Data.Sequence as Seq
@@ -305,7 +305,7 @@ renderList (BreakingSpace : xs) = do
305305 let xs' = dropWhile isBreakingSpace xs
306306 let next = takeWhile isText xs'
307307 st <- get
308− let off = sum $ map offsetOf next
308+ let off = foldl' (+) 0 $ map offsetOf next
309309 case lineLength st of
310310 Just l | column st + 1 + off > l -> do
311311 outp (-1) "\n"
@@ -540,4 +540,4 @@ charWidth c =
540540-- | Get real length of string, taking into account combining and double-wide
541541-- characters.
542542realLength :: String -> Int
543−realLength = sum . map charWidth
543+realLength = foldl' (+) 0 . map charWidth