Skip to content

Commit a34f5c2

Browse files
KommuSoftjgm
authored andcommitted
hlint improvements
1 parent da9aeed commit a34f5c2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Text/Pandoc/Arbitrary.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ instance Arbitrary Inlines where
3939
shrink = fmap fromList . ((++) <$> shrink <*> flattenShrinkInlines) . toList
4040
where flattenShrinkInlines (x:xs) =
4141
let x' = flattenInline x
42-
in (if null x' then [] else [x' ++ xs]) ++ [x:xs' | xs' <- flattenShrinkInlines xs]
42+
in [x' ++ xs | not (null x')] ++ [x:xs' | xs' <- flattenShrinkInlines xs]
4343
flattenShrinkInlines [] = []
4444
flattenInline :: Inline -> [Inline]
4545
flattenInline (Str _) = []
@@ -68,7 +68,7 @@ instance Arbitrary Blocks where
6868
shrink = fmap fromList . ((++) <$> shrink <*> flattenShrinkBlocks) . toList
6969
where flattenShrinkBlocks (x:xs) =
7070
let x' = flattenBlock x
71-
in (if null x' then [] else [x' ++ xs]) ++ [x:xs' | xs' <- flattenShrinkBlocks xs]
71+
in [x' ++ xs | not (null x')] ++ [x:xs' | xs' <- flattenShrinkBlocks xs]
7272
flattenShrinkBlocks [] = []
7373
flattenBlock :: Block -> [Block]
7474
flattenBlock Plain{} = []

src/Text/Pandoc/Definition.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ $(let jsonOpts = defaultOptions
391391
{ allNullaryToStringTag = False
392392
, sumEncoding = TaggedObject { tagFieldName = "t", contentsFieldName = "c" }
393393
}
394-
in fmap concat $ traverse (deriveJSON jsonOpts)
394+
in concat <$> traverse (deriveJSON jsonOpts)
395395
[ ''MetaValue
396396
, ''CitationMode
397397
, ''Citation

0 commit comments

Comments
 (0)