Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit d84a725

Browse files
committed
Fix shadowed name warnings
1 parent c326aae commit d84a725

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

src/Text/Markdown/SlamDown/Eval.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ eval fs = everywhereM b i
5555
nbeTextBox = evalTextBox >>> map (map quoteTextBox)
5656

5757
evalTextBox SD.TextBox (Compose M.Maybe SD.Expr) m (M.Maybe (SD.TextBox Identity))
58-
evalTextBox tb = T.sequence $ fs.textBox <$> asCode tb <|> pure <$> asLit tb
58+
evalTextBox tb' = T.sequence $ fs.textBox <$> asCode tb' <|> pure <$> asLit tb'
5959
where
6060
asLit = SD.traverseTextBox (unwrap >>> (_ >>= SD.getLiteral) >>> map Identity)
6161
asCode = SD.traverseTextBox (unwrap >>> (_ >>= SD.getUnevaluated) >>> map Const)

src/Text/Markdown/SlamDown/Parser.purs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ splitIndentedChunks ss =
207207
isCodeFence String Boolean
208208
isCodeFence s = isSimpleFence s || (isEvaluatedCode s && isSimpleFence (S.drop 1 s))
209209
where
210-
isSimpleFence s = S.count (isFenceChar <<< S.singleton) s >= 3
210+
isSimpleFence s' = S.count (isFenceChar <<< S.singleton) s' >= 3
211211

212212
isEvaluatedCode String Boolean
213213
isEvaluatedCode s = S.take 1 s == "!"
@@ -315,8 +315,8 @@ parseBlocks
315315
. (SD.Value a)
316316
L.List (Container a)
317317
Either String (L.List (SD.Block a))
318-
parseBlocks cs =
319-
case cs of
318+
parseBlocks =
319+
case _ of
320320
L.Nil → pure L.Nil
321321
(CText s) : (CSetextHeader n) : cs → do
322322
hd ← Inline.parseInlines $ L.singleton s
@@ -355,13 +355,13 @@ parseBlocks cs =
355355
parseBlocks cs
356356

357357
validateBlock a. SD.Block a V.V (Array String) (SD.Block a)
358-
validateBlock b =
359-
case b of
358+
validateBlock =
359+
case _ of
360360
SD.Paragraph inls → SD.Paragraph <$> traverse Inline.validateInline inls
361361
SD.Header i inls → SD.Header i <$> traverse Inline.validateInline inls
362362
SD.Blockquote bls → SD.Blockquote <$> traverse validateBlock bls
363363
SD.Lst lt blss → SD.Lst lt <$> traverse (traverse validateBlock) blss
364-
_ → pure b
364+
b → pure b
365365

366366
validateSlamDown a. SD.SlamDownP a V.V (Array String) (SD.SlamDownP a)
367367
validateSlamDown (SD.SlamDown bls) = SD.SlamDown <$> traverse validateBlock bls

src/Text/Markdown/SlamDown/Pretty.purs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ prettyPrintTextBox t =
159159
<> M.maybe "" (\x → " (" <> prettyPrintDefault x <> ")") (SD.traverseTextBox unwrap t)
160160
where
161161
prettyPrintTemplate f. SD.TextBox f String
162-
prettyPrintTemplate t =
163-
case t of
162+
prettyPrintTemplate =
163+
case _ of
164164
SD.PlainText _ → "______"
165165
SD.Numeric _ → "#______"
166166
SD.Date _ → "__-__-____"
@@ -170,8 +170,8 @@ prettyPrintTextBox t =
170170
SD.DateTime SD.Seconds _ → "__-__-____ __:__:__"
171171

172172
prettyPrintDefault SD.TextBox SD.Expr String
173-
prettyPrintDefault t =
174-
case t of
173+
prettyPrintDefault =
174+
case _ of
175175
SD.PlainText def → prettyPrintExpr id id def
176176
SD.Numeric def → prettyPrintExpr id HN.toString def
177177
SD.Date def → prettyPrintExpr id prettyPrintDate def

src/Text/Markdown/SlamDown/Traverse.purs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ everywhereM b i (SD.SlamDown bs) =
3131
b' SD.Block a m (SD.Block a)
3232
b' (SD.Paragraph is) = (SD.Paragraph <$> T.traverse i' is) >>= b
3333
b' (SD.Header n is) = (SD.Header n <$> T.traverse i' is) >>= b
34-
b' (SD.Blockquote bs) = (SD.Blockquote <$> T.traverse b' bs) >>= b
34+
b' (SD.Blockquote bs') = (SD.Blockquote <$> T.traverse b' bs') >>= b
3535
b' (SD.Lst lt bss) = (SD.Lst lt <$> T.traverse (T.traverse b') bss) >>= b
3636
b' other = b other
3737

@@ -66,7 +66,7 @@ everywhereTopDownM b i (SD.SlamDown bs) =
6666
b' SD.Block a m (SD.Block a)
6767
b' (SD.Paragraph is) = SD.Paragraph <$> T.traverse (i' <=< i) is
6868
b' (SD.Header n is) = SD.Header n <$> T.traverse (i' <=< i) is
69-
b' (SD.Blockquote bs) = SD.Blockquote <$> T.traverse (b' <=< b) bs
69+
b' (SD.Blockquote bs') = SD.Blockquote <$> T.traverse (b' <=< b) bs'
7070
b' (SD.Lst ty bss) = SD.Lst ty <$> T.traverse (T.traverse (b' <=< b)) bss
7171
b' other = b other
7272

@@ -102,8 +102,8 @@ everythingM b i (SD.SlamDown bs) =
102102
b' SD.Block a m r
103103
b' x@(SD.Paragraph is) = b x >>= \r → F.foldl (<>) r <$> T.traverse i' is
104104
b' x@(SD.Header _ is) = b x >>= \r → F.foldl (<>) r <$> T.traverse i' is
105-
b' x@(SD.Blockquote bs) = b x >>= \r → F.foldl (<>) r <$> T.traverse b' bs
106-
b' x@(SD.Lst _ bss) = b x >>= \r → F.foldl (<>) r <<< join <$> T.traverse (\bs → T.traverse b' bs) bss
105+
b' x@(SD.Blockquote bs') = b x >>= \r → F.foldl (<>) r <$> T.traverse b' bs'
106+
b' x@(SD.Lst _ bss) = b x >>= \r → F.foldl (<>) r <<< join <$> T.traverse (\bs'T.traverse b' bs') bss
107107
b' x = b x
108108

109109
i' SD.Inline a m r

0 commit comments

Comments
 (0)