diff options
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/TWiki.hs | 8 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/Txt2Tags.hs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Readers/TWiki.hs b/src/Text/Pandoc/Readers/TWiki.hs index fc2bdc069..76a25ad82 100644 --- a/src/Text/Pandoc/Readers/TWiki.hs +++ b/src/Text/Pandoc/Readers/TWiki.hs @@ -205,7 +205,7 @@ orderedList :: String -> TWParser B.Blocks orderedList prefix = tryMsg "orderedList" $ parseList prefix (oneOf "1iIaA") (string ". ") -parseList :: Show a => String -> TWParser Char -> TWParser a -> TWParser B.Blocks +parseList :: String -> TWParser Char -> TWParser a -> TWParser B.Blocks parseList prefix marker delim = do (indent, style) <- lookAhead $ string prefix *> listStyle <* delim blocks <- many $ parseListItem (prefix ++ indent) (char style <* delim) @@ -281,7 +281,7 @@ tableParseColumn = char '|' *> skipSpaces *> tableEndOfRow :: TWParser Char tableEndOfRow = lookAhead (try $ char '|' >> char '\n') >> char '|' -tableColumnContent :: Show a => TWParser a -> TWParser B.Blocks +tableColumnContent :: TWParser a -> TWParser B.Blocks tableColumnContent end = manyTill content (lookAhead $ try end) >>= return . B.plain . mconcat where content = continuation <|> inline @@ -351,11 +351,11 @@ linebreak = newline >> notFollowedBy newline >> (lastNewline <|> innerNewline) where lastNewline = eof >> return mempty innerNewline = return B.space -between :: (Show b, Monoid c) => TWParser a -> TWParser b -> (TWParser b -> TWParser c) -> TWParser c +between :: (Monoid c) => TWParser a -> TWParser b -> (TWParser b -> TWParser c) -> TWParser c between start end p = mconcat <$> try (start >> notFollowedBy whitespace >> many1Till (p end) end) -enclosed :: (Show a, Monoid b) => TWParser a -> (TWParser a -> TWParser b) -> TWParser b +enclosed :: (Monoid b) => TWParser a -> (TWParser a -> TWParser b) -> TWParser b enclosed sep p = between sep (try $ sep <* endMarker) p where endMarker = lookAhead $ skip endSpace <|> skip (oneOf ".,!?:)|") <|> eof diff --git a/src/Text/Pandoc/Readers/Txt2Tags.hs b/src/Text/Pandoc/Readers/Txt2Tags.hs index c28ce1653..277d747d6 100644 --- a/src/Text/Pandoc/Readers/Txt2Tags.hs +++ b/src/Text/Pandoc/Readers/Txt2Tags.hs @@ -285,7 +285,7 @@ table = try $ do (zip aligns (replicate ncolumns 0.0)) headerPadded rowsPadded -pad :: (Show a, Monoid a) => Int -> [a] -> [a] +pad :: (Monoid a) => Int -> [a] -> [a] pad n xs = xs ++ (replicate (n - length xs) mempty) |