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) =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue