@@ -248,7 +248,7 @@ oneOfStrings' matches strs = try $ do
248 let strs' = [xs | (x:xs) <- strs, x `matches` c]
248 let strs' = [xs | (x:xs) <- strs, x `matches` c]
249 case strs' of
249 case strs' of
250 [] -> fail "not found"
250 [] -> fail "not found"
251− _ -> (c:) `fmap` oneOfStrings' matches strs'
251+ _ -> (c:) <$> oneOfStrings' matches strs'
252 <|> if "" `elem` strs'
252 <|> if "" `elem` strs'
253 then return [c]
253 then return [c]
254 else fail "not found"
254 else fail "not found"
@@ -389,8 +389,8 @@ emailAddress :: Stream s m Char => ParserT s st m (String, String)
389emailAddress = try $ toResult <$> mailbox <*> (char '@' *> domain)
389emailAddress = try $ toResult <$> mailbox <*> (char '@' *> domain)
390 where toResult mbox dom = let full = fromEntities $ mbox ++ '@':dom
390 where toResult mbox dom = let full = fromEntities $ mbox ++ '@':dom
391 in (full, escapeURI $ "mailto:" ++ full)
391 in (full, escapeURI $ "mailto:" ++ full)
392− mailbox = intercalate "." `fmap` (emailWord `sepby1` dot)
392+ mailbox = intercalate "." <$> (emailWord `sepby1` dot)
393− domain = intercalate "." `fmap` (subdomain `sepby1` dot)
393+ domain = intercalate "." <$> (subdomain `sepby1` dot)
394 dot = char '.'
394 dot = char '.'
395 subdomain = many1 $ alphaNum <|> innerPunct
395 subdomain = many1 $ alphaNum <|> innerPunct
396 innerPunct = try (satisfy (\c -> isEmailPunct c || c == '@') <*
396 innerPunct = try (satisfy (\c -> isEmailPunct c || c == '@') <*
@@ -453,7 +453,7 @@ uri = try $ do
453 <|> entity
453 <|> entity
454 <|> (try $ punct >>
454 <|> (try $ punct >>
455 lookAhead (void (satisfy isWordChar) <|> percentEscaped))
455 lookAhead (void (satisfy isWordChar) <|> percentEscaped))
456− str <- snd `fmap` withRaw (skipMany1 ( () <$
456+ str <- snd <$> withRaw (skipMany1 ( () <$
457 (enclosed (char '(') (char ')') uriChunk
457 (enclosed (char '(') (char ')') uriChunk
458 <|> enclosed (char '{') (char '}') uriChunk
458 <|> enclosed (char '{') (char '}') uriChunk
459 <|> enclosed (char '[') (char ']') uriChunk)
459 <|> enclosed (char '[') (char ']') uriChunk)
@@ -895,7 +895,7 @@ class HasReaderOptions st where
895 extractReaderOptions :: st -> ReaderOptions
895 extractReaderOptions :: st -> ReaderOptions
896 getOption :: (Stream s m t) => (ReaderOptions -> b) -> ParserT s st m b
896 getOption :: (Stream s m t) => (ReaderOptions -> b) -> ParserT s st m b
897 -- default
897 -- default
898− getOption f = (f . extractReaderOptions) `fmap` getState
898+ getOption f = (f . extractReaderOptions) <$> getState
900instance HasReaderOptions ParserState where
900instance HasReaderOptions ParserState where
901 extractReaderOptions = stateOptions
901 extractReaderOptions = stateOptions
@@ -1016,7 +1016,7 @@ type SubstTable = M.Map Key Inlines
1016registerHeader :: (Stream s m a, HasReaderOptions st, HasHeaderMap st, HasIdentifierList st)
1016registerHeader :: (Stream s m a, HasReaderOptions st, HasHeaderMap st, HasIdentifierList st)
1017 => Attr -> Inlines -> ParserT s st m Attr
1017 => Attr -> Inlines -> ParserT s st m Attr
1018registerHeader (ident,classes,kvs) header' = do
1018registerHeader (ident,classes,kvs) header' = do
1019− ids <- extractIdentifierList `fmap` getState
1019+ ids <- extractIdentifierList <$> getState
1020 exts <- getOption readerExtensions
1020 exts <- getOption readerExtensions
1021 let insert' = M.insertWith (\_new old -> old)
1021 let insert' = M.insertWith (\_new old -> old)
1022 if null ident && Ext_auto_identifiers `Set.member` exts
1022 if null ident && Ext_auto_identifiers `Set.member` exts
@@ -1173,7 +1173,7 @@ nested :: Stream s m a
1173 => ParserT s ParserState m a
1173 => ParserT s ParserState m a
1174 -> ParserT s ParserState m a
1174 -> ParserT s ParserState m a
1175nested p = do
1175nested p = do
1176− nestlevel <- stateMaxNestingLevel `fmap` getState
1176+ nestlevel <- stateMaxNestingLevel <$> getState
1177 guard $ nestlevel > 0
1177 guard $ nestlevel > 0
1178 updateState $ \st -> st{ stateMaxNestingLevel = stateMaxNestingLevel st - 1 }
1178 updateState $ \st -> st{ stateMaxNestingLevel = stateMaxNestingLevel st - 1 }
1179 res <- p
1179 res <- p
@@ -1220,6 +1220,6 @@ applyMacros' :: Stream [Char] m Char
1220applyMacros' target = do
1220applyMacros' target = do
1221 apply <- getOption readerApplyMacros
1221 apply <- getOption readerApplyMacros
1222 if apply
1222 if apply
1223− then do macros <- extractMacros `fmap` getState
1223+ then do macros <- extractMacros <$> getState
1224 return $ applyMacros macros target
1224 return $ applyMacros macros target
1225 else return target
1225 else return target