--- pandoc-1.13.2-orig/pandoc.cabal 2014-12-20 19:18:27.000000000 +1100 +++ pandoc-1.13.2/pandoc.cabal 2015-01-05 10:39:17.951823846 +1100 @@ -250,7 +250,7 @@ hslua >= 0.3 && < 0.4, binary >= 0.5 && < 0.8, SHA >= 1.6 && < 1.7, - haddock-library >= 1.1 && < 1.2, + haddock-library >= 1.1 && < 1.3, old-time, deepseq-generics >= 0.1 && < 0.2, JuicyPixels >= 3.1.6.1 && < 3.3 --- pandoc-1.13.2-orig/src/Text/Pandoc/Readers/Haddock.hs 2014-12-20 19:18:27.000000000 +1100 +++ pandoc-1.13.2/src/Text/Pandoc/Readers/Haddock.hs 2015-01-05 14:24:34.371820789 +1100 @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {- | Module : Text.Pandoc.Readers.Haddock Copyright : Copyright (C) 2013 David Lazar @@ -29,7 +30,12 @@ readHaddock :: ReaderOptions -- ^ Reader options -> String -- ^ String to parse -> Pandoc -readHaddock opts = B.doc . docHToBlocks . trace' . parseParas +readHaddock opts = +#if MIN_VERSION_haddock_library(1,2,0) + B.doc . docHToBlocks . trace' . _doc . parseParas +#else + B.doc . docHToBlocks . trace' . parseParas +#endif where trace' x = if readerTrace opts then trace (show x) x else x --- pandoc-1.13.2-orig/src/Text/Pandoc/Readers/LaTeX.hs 2014-12-20 19:18:27.000000000 +1100 +++ pandoc-1.13.2/src/Text/Pandoc/Readers/LaTeX.hs 2015-01-05 11:20:35.193045904 +1100 @@ -592,7 +592,7 @@ unescapeURL :: String -> String unescapeURL ('\\':x:xs) | isEscapable x = x:unescapeURL xs - where isEscapable c = c `elem` "#$%&~_^\\{}" + where isEscapable c = c `elem` ("#$%&~_^\\{}" :: String) unescapeURL (x:xs) = x:unescapeURL xs unescapeURL [] = "" @@ -1224,7 +1224,7 @@ <* optional sp <* optional (char ',') <* optional sp) - where isBibtexKeyChar c = isAlphaNum c || c `elem` ".:;?!`'()/*@_+=-[]*" + where isBibtexKeyChar c = isAlphaNum c || c `elem` (".:;?!`'()/*@_+=-[]*" :: String) cites :: CitationMode -> Bool -> LP [Citation] cites mode multi = try $ do --- pandoc-1.13.2-orig/src/Text/Pandoc/Readers/Org.hs 2014-12-20 19:18:27.000000000 +1100 +++ pandoc-1.13.2/src/Text/Pandoc/Readers/Org.hs 2015-01-05 11:24:53.294689830 +1100 @@ -1,5 +1,6 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE FlexibleContexts #-} {- Copyright (C) 2014 Albert Krewinkel @@ -1168,7 +1169,7 @@ isUri :: String -> Bool isUri s = let (scheme, path) = break (== ':') s - in all (\c -> isAlphaNum c || c `elem` ".-") scheme + in all (\c -> isAlphaNum c || c `elem` (".-" :: String)) scheme && not (null path) isAbsoluteFilePath :: String -> Bool @@ -1214,7 +1215,7 @@ solidify = map replaceSpecialChar where replaceSpecialChar c | isAlphaNum c = c - | c `elem` "_.-:" = c + | c `elem` ("_.-:" :: String) = c | otherwise = '-' -- | Parses an inline code block and marks it as an babel block. @@ -1465,7 +1466,7 @@ parseAsMathMLSym :: String -> Maybe Inlines parseAsMathMLSym cs = B.str <$> MathMLEntityMap.getUnicode (clean cs) -- dropWhileEnd would be nice here, but it's not available before base 4.5 - where clean = reverse . dropWhile (`elem` "{}") . reverse . drop 1 + where clean = reverse . dropWhile (`elem` ("{}" :: String)) . reverse . drop 1 state :: ParserState state = def{ stateOptions = def{ readerParseRaw = True }} --- pandoc-1.13.2-orig/src/Text/Pandoc/Readers/RST.hs 2014-12-20 19:18:27.000000000 +1100 +++ pandoc-1.13.2/src/Text/Pandoc/Readers/RST.hs 2015-01-05 11:21:59.819266953 +1100 @@ -1,4 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE FlexibleContexts #-} {- Copyright (C) 2006-2014 John MacFarlane @@ -708,7 +709,7 @@ toChunks :: String -> [String] toChunks = dropWhile null . map (trim . unlines) - . splitBy (all (`elem` " \t")) . lines + . splitBy (all (`elem` (" \t" :: String))) . lines codeblock :: Maybe String -> String -> String -> RSTParser Blocks codeblock numberLines lang body = --- pandoc-1.13.2-orig/src/Text/Pandoc/Readers/TWiki.hs 2014-12-20 19:18:27.000000000 +1100 +++ pandoc-1.13.2/src/Text/Pandoc/Readers/TWiki.hs 2015-01-05 11:25:22.450138135 +1100 @@ -1,4 +1,4 @@ -{-# LANGUAGE RelaxedPolyRec, FlexibleInstances, TypeSynonymInstances #-} +{-# LANGUAGE RelaxedPolyRec, FlexibleInstances, TypeSynonymInstances, FlexibleContexts #-} -- RelaxedPolyRec needed for inlinesBetween on GHC < 7 {- Copyright (C) 2014 Alexander Sulfrian --- pandoc-1.13.2-orig/src/Text/Pandoc/Templates.hs 2014-12-20 19:18:27.000000000 +1100 +++ pandoc-1.13.2/src/Text/Pandoc/Templates.hs 2015-01-05 10:45:45.255969737 +1100 @@ -124,7 +124,7 @@ -> String -- ^ Name of writer -> IO (Either E.IOException String) getDefaultTemplate user writer = do - let format = takeWhile (`notElem` "+-") writer -- strip off extensions + let format = takeWhile (`notElem` ("+-" :: String)) writer -- strip off extensions case format of "native" -> return $ Right "" "json" -> return $ Right "" @@ -288,7 +288,7 @@ reservedWords = ["else","endif","for","endfor","sep"] skipEndline :: Parser () -skipEndline = P.try $ P.skipMany (P.satisfy (`elem` " \t")) >> P.char '\n' >> return () +skipEndline = P.try $ P.skipMany (P.satisfy (`elem` (" \t" :: String))) >> P.char '\n' >> return () pConditional :: Parser Template pConditional = do --- pandoc-1.13.2-orig/src/Text/Pandoc/Writers/ConTeXt.hs 2014-12-20 19:18:27.000000000 +1100 +++ pandoc-1.13.2/src/Text/Pandoc/Writers/ConTeXt.hs 2015-01-05 11:36:04.213852145 +1100 @@ -119,7 +119,7 @@ toLabel :: String -> String toLabel z = concatMap go z where go x - | elem x "\\#[]\",{}%()|=" = "ux" ++ printf "%x" (ord x) + | elem x ("\\#[]\",{}%()|=" :: String) = "ux" ++ printf "%x" (ord x) | otherwise = [x] -- | Convert Elements to ConTeXt --- pandoc-1.13.2-orig/src/Text/Pandoc/Writers/EPUB.hs 2014-12-20 19:18:27.000000000 +1100 +++ pandoc-1.13.2/src/Text/Pandoc/Writers/EPUB.hs 2015-01-05 11:35:29.166882307 +1100 @@ -1,4 +1,4 @@ -{-# LANGUAGE PatternGuards, CPP, ScopedTypeVariables, ViewPatterns #-} +{-# LANGUAGE PatternGuards, CPP, ScopedTypeVariables, ViewPatterns, FlexibleContexts #-} {- Copyright (C) 2010-2014 John MacFarlane --- pandoc-1.13.2-orig/src/Text/Pandoc/Writers/ICML.hs 2014-12-20 19:18:27.000000000 +1100 +++ pandoc-1.13.2/src/Text/Pandoc/Writers/ICML.hs 2015-01-05 11:35:07.163880901 +1100 @@ -1,4 +1,4 @@ -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE OverloadedStrings, FlexibleContexts #-} {- | Module : Text.Pandoc.Writers.ICML --- pandoc-1.13.2-orig/src/Text/Pandoc/Writers/LaTeX.hs 2014-12-20 19:18:27.000000000 +1100 +++ pandoc-1.13.2/src/Text/Pandoc/Writers/LaTeX.hs 2015-01-05 11:32:29.461099578 +1100 @@ -240,7 +240,7 @@ where go [] = "" go (x:xs) | (isLetter x || isDigit x) && isAscii x = x:go xs - | elem x "-+=:;." = x:go xs + | elem x ("-+=:;." :: String) = x:go xs | otherwise = "ux" ++ printf "%x" (ord x) ++ go xs -- | Puts contents into LaTeX command. --- pandoc-1.13.2-orig/src/Text/Pandoc/Writers/Markdown.hs 2014-12-20 19:18:27.000000000 +1100 +++ pandoc-1.13.2/src/Text/Pandoc/Writers/Markdown.hs 2015-01-05 11:34:25.437241616 +1100 @@ -323,9 +323,9 @@ then Just $ writerColumns opts else Nothing let rendered = render colwidth contents - let escapeDelimiter (x:xs) | x `elem` ".()" = '\\':x:xs - | otherwise = x : escapeDelimiter xs - escapeDelimiter [] = [] + let escapeDelimiter (x:xs) | x `elem` (".()" :: String) = '\\':x:xs + | otherwise = x : escapeDelimiter xs + escapeDelimiter [] = [] let contents' = if isEnabled Ext_all_symbols_escapable opts && not (stPlain st) && beginsWithOrderedListMarker rendered then text $ escapeDelimiter rendered @@ -681,7 +681,7 @@ mapM (inlineToMarkdown opts) (avoidBadWraps lst) >>= return . cat where avoidBadWraps [] = [] avoidBadWraps (Space:Str (c:cs):xs) - | c `elem` "-*+>" = Str (' ':c:cs) : avoidBadWraps xs + | c `elem` ("-*+>" :: String) = Str (' ':c:cs) : avoidBadWraps xs avoidBadWraps (x:xs) = x : avoidBadWraps xs escapeSpaces :: Inline -> Inline @@ -821,8 +821,8 @@ sdoc <- inlineListToMarkdown opts sinlines let k' = text (modekey m ++ "@" ++ k) r = case sinlines of - Str (y:_):_ | y `elem` ",;]@" -> k' <> sdoc - _ -> k' <+> sdoc + Str (y:_):_ | y `elem` (",;]@" :: String) -> k' <> sdoc + _ -> k' <+> sdoc return $ pdoc <+> r modekey SuppressAuthor = "-" modekey _ = "" --- pandoc-1.13.2-orig/src/Text/Pandoc/Writers/OpenDocument.hs 2014-12-20 19:18:27.000000000 +1100 +++ pandoc-1.13.2/src/Text/Pandoc/Writers/OpenDocument.hs 2015-01-05 11:36:22.915591722 +1100 @@ -1,4 +1,4 @@ -{-# LANGUAGE PatternGuards, OverloadedStrings #-} +{-# LANGUAGE PatternGuards, OverloadedStrings, FlexibleContexts #-} {- Copyright (C) 2008-2014 Andrea Rossato and John MacFarlane. --- pandoc-1.13.2-orig/src/Text/Pandoc/Writers/RST.hs 2014-12-20 19:18:27.000000000 +1100 +++ pandoc-1.13.2/src/Text/Pandoc/Writers/RST.hs 2015-01-05 11:32:00.815007351 +1100 @@ -105,7 +105,7 @@ -> State WriterState Doc keyToRST (label, (src, _)) = do label' <- inlineListToRST label - let label'' = if ':' `elem` (render Nothing label') + let label'' = if ':' `elem` ((render Nothing label') :: String) then char '`' <> label' <> char '`' else label' return $ nowrap $ ".. _" <> label'' <> ": " <> text src @@ -333,12 +333,12 @@ okAfterComplex :: Inline -> Bool okAfterComplex Space = True okAfterComplex LineBreak = True - okAfterComplex (Str (c:_)) = isSpace c || c `elem` "-.,:;!?\\/'\")]}>–—" + okAfterComplex (Str (c:_)) = isSpace c || c `elem` ("-.,:;!?\\/'\")]}>–—" :: String) okAfterComplex _ = False okBeforeComplex :: Inline -> Bool okBeforeComplex Space = True okBeforeComplex LineBreak = True - okBeforeComplex (Str (c:_)) = isSpace c || c `elem` "-:/'\"<([{–—" + okBeforeComplex (Str (c:_)) = isSpace c || c `elem` ("-:/'\"<([{–—" :: String) okBeforeComplex _ = False isComplex :: Inline -> Bool isComplex (Emph _) = True --- pandoc-1.13.2-orig/src/Text/Pandoc/Writers/Texinfo.hs 2014-12-20 19:18:27.000000000 +1100 +++ pandoc-1.13.2/src/Text/Pandoc/Writers/Texinfo.hs 2015-01-05 11:33:07.407217820 +1100 @@ -368,7 +368,7 @@ -- periods, commas, colons, and parentheses are disallowed in node names disallowedInNode :: Char -> Bool -disallowedInNode c = c `elem` ".,:()" +disallowedInNode c = c `elem` (".,:()" :: String) -- | Convert inline element to Texinfo inlineToTexinfo :: Inline -- ^ Inline to convert