aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Muse.hs
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2017-12-06 19:38:25 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2017-12-06 19:38:25 +0300
commite536c4d9c9c4ff73213dc0273654ea3e1916f22e (patch)
tree944c84c1fd2440af27c42c0c8572bf90e3910295 /src/Text/Pandoc/Readers/Muse.hs
parent6fd3cdac46f916b74d88aab696dc81c93581c162 (diff)
downloadpandoc-e536c4d9c9c4ff73213dc0273654ea3e1916f22e.tar.gz
hlint Muse reader and tests
Diffstat (limited to 'src/Text/Pandoc/Readers/Muse.hs')
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index 72344bfe0..04cec149b 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -148,7 +148,7 @@ atStart p = do
--
-- While not documented, Emacs Muse allows "-" in directive name
-parseDirectiveKey :: PandocMonad m => MuseParser m (String)
+parseDirectiveKey :: PandocMonad m => MuseParser m String
parseDirectiveKey = do
char '#'
many (letter <|> char '-')
@@ -173,7 +173,7 @@ parseAmuseDirective = do
value <- parseFromString (trimInlinesF . mconcat <$> many inline) $ unlines (first : rest)
return (key, value)
where
- endOfDirective = lookAhead $ endOfInput <|> (try $ void blankline) <|> (try $ void parseDirectiveKey)
+ endOfDirective = lookAhead $ endOfInput <|> try (void blankline) <|> try (void parseDirectiveKey)
endOfInput = try $ skipMany blankline >> skipSpaces >> eof
directive :: PandocMonad m => MuseParser m ()
@@ -428,7 +428,7 @@ listStart marker = try $ do
dropSpacePrefix :: [String] -> [String]
dropSpacePrefix lns =
map (drop maxIndent) lns
- where flns = filter (\s -> not $ all (== ' ') s) lns
+ where flns = filter (not . all (== ' ')) lns
maxIndent = if null flns then 0 else length $ takeWhile (== ' ') $ foldl1 commonPrefix flns
listItemContents :: PandocMonad m => Int -> MuseParser m (F Blocks)
@@ -620,7 +620,7 @@ inlineList = [ endline
]
inline :: PandocMonad m => MuseParser m (F Inlines)
-inline = (choice inlineList) <?> "inline"
+inline = choice inlineList <?> "inline"
endline :: PandocMonad m => MuseParser m (F Inlines)
endline = try $ do