@@ -1,5 +1,6 @@
1{-# LANGUAGE OverloadedStrings #-}
1{-# LANGUAGE OverloadedStrings #-}
2{-# LANGUAGE GeneralizedNewtypeDeriving #-}
2{-# LANGUAGE GeneralizedNewtypeDeriving #-}
3+{-# LANGUAGE FlexibleContexts #-}
4Copyright (C) 2014 Albert Krewinkel <tarleb@moltkeplatz.de>
5Copyright (C) 2014 Albert Krewinkel <tarleb@moltkeplatz.de>
@@ -1168,7 +1169,7 @@ isRelativeFilePath s = (("./" `isPrefixOf` s) || ("../" `isPrefixOf` s)) &&
1169isUri :: String -> Bool
1170isUri :: String -> Bool
1170isUri s = let (scheme, path) = break (== ':') s
1171isUri s = let (scheme, path) = break (== ':') s
1171− in all (\c -> isAlphaNum c || c `elem` ".-") scheme
1172+ in all (\c -> isAlphaNum c || c `elem` (".-" :: String)) scheme
1172 && not (null path)
1173 && not (null path)
1174isAbsoluteFilePath :: String -> Bool
1175isAbsoluteFilePath :: String -> Bool
@@ -1214,7 +1215,7 @@ solidify :: String -> String
1214solidify = map replaceSpecialChar
1215solidify = map replaceSpecialChar
1215 where replaceSpecialChar c
1216 where replaceSpecialChar c
1216 | isAlphaNum c = c
1217 | isAlphaNum c = c
1217− | c `elem` "_.-:" = c
1218+ | c `elem` ("_.-:" :: String) = c
1218 | otherwise = '-'
1219 | otherwise = '-'
1220-- | Parses an inline code block and marks it as an babel block.
1221-- | Parses an inline code block and marks it as an babel block.
@@ -1465,7 +1466,7 @@ inlineLaTeX = try $ do
1465 parseAsMathMLSym :: String -> Maybe Inlines
1466 parseAsMathMLSym :: String -> Maybe Inlines
1466 parseAsMathMLSym cs = B.str <$> MathMLEntityMap.getUnicode (clean cs)
1467 parseAsMathMLSym cs = B.str <$> MathMLEntityMap.getUnicode (clean cs)
1467 -- dropWhileEnd would be nice here, but it's not available before base 4.5
1468 -- dropWhileEnd would be nice here, but it's not available before base 4.5
1468− where clean = reverse . dropWhile (`elem` "{}") . reverse . drop 1
1469+ where clean = reverse . dropWhile (`elem` ("{}" :: String)) . reverse . drop 1
1470 state :: ParserState
1471 state :: ParserState
1471 state = def{ stateOptions = def{ readerParseRaw = True }}
1472 state = def{ stateOptions = def{ readerParseRaw = True }}