@@ -740,11 +740,11 @@ lineBlockLines = try $ do
740740-- | Parse a table using 'headerParser', 'rowParser',
741741-- 'lineParser', and 'footerParser'.
742742tableWith :: Stream s m Char
743− => ParserT s ParserState m ([[Block]], [Alignment], [Int])
744− -> ([Int] -> ParserT s ParserState m [[Block]])
743+ => ParserT s ParserState m ([Blocks], [Alignment], [Int])
744+ -> ([Int] -> ParserT s ParserState m [Blocks])
745745 -> ParserT s ParserState m sep
746746 -> ParserT s ParserState m end
747− -> ParserT s ParserState m Block
747+ -> ParserT s ParserState m Blocks
748748tableWith headerParser rowParser lineParser footerParser = try $ do
749749 (heads, aligns, indices) <- headerParser
750750 lines' <- rowParser indices `sepEndBy1` lineParser
@@ -753,7 +753,7 @@ tableWith headerParser rowParser lineParser footerParser = try $ do
753753 let widths = if (indices == [])
754754 then replicate (length aligns) 0.0
755755 else widthsFromIndices numColumns indices
756− return $ Table [] aligns widths heads lines'
756+ return $ B.table mempty (zip aligns widths) heads lines'
757757
758758-- Calculate relative widths of table columns, based on indices
759759widthsFromIndices :: Int -- Number of columns on terminal
@@ -787,9 +787,9 @@ widthsFromIndices numColumns' indices =
787787-- which may be grid, separated by blank lines, and
788788-- ending with a footer (dashed line followed by blank line).
789789gridTableWith :: Stream [Char] m Char
790− => ParserT [Char] ParserState m [Block] -- ^ Block list parser
790+ => ParserT [Char] ParserState m Blocks -- ^ Block list parser
791791 -> Bool -- ^ Headerless table
792− -> ParserT [Char] ParserState m Block
792+ -> ParserT [Char] ParserState m Blocks
793793gridTableWith blocks headless =
794794 tableWith (gridTableHeader headless blocks) (gridTableRow blocks)
795795 (gridTableSep '-') gridTableFooter
@@ -818,8 +818,8 @@ gridTableSep ch = try $ gridDashedLines ch >> return '\n'
818818-- | Parse header for a grid table.
819819gridTableHeader :: Stream [Char] m Char
820820 => Bool -- ^ Headerless table
821− -> ParserT [Char] ParserState m [Block]
822− -> ParserT [Char] ParserState m ([[Block]], [Alignment], [Int])
821+ -> ParserT [Char] ParserState m Blocks
822+ -> ParserT [Char] ParserState m ([Blocks], [Alignment], [Int])
823823gridTableHeader headless blocks = try $ do
824824 optional blanklines
825825 dashes <- gridDashedLines '-'
@@ -850,9 +850,9 @@ gridTableRawLine indices = do
850850
851851-- | Parse row of grid table.
852852gridTableRow :: Stream [Char] m Char
853− => ParserT [Char] ParserState m [Block]
853+ => ParserT [Char] ParserState m Blocks
854854 -> [Int]
855− -> ParserT [Char] ParserState m [[Block]]
855+ -> ParserT [Char] ParserState m [Blocks]
856856gridTableRow blocks indices = do
857857 colLines <- many1 (gridTableRawLine indices)
858858 let cols = map ((++ "\n") . unlines . removeOneLeadingSpace) $
@@ -867,8 +867,8 @@ removeOneLeadingSpace xs =
867867 where startsWithSpace "" = True
868868 startsWithSpace (y:_) = y == ' '
869869
870−compactifyCell :: [Block] -> [Block]
871−compactifyCell bs = head $ compactify [bs]
870+compactifyCell :: Blocks -> Blocks
871+compactifyCell bs = head $ compactify' [bs]
872872
873873-- | Parse footer for a grid table.
874874gridTableFooter :: Stream s m Char => ParserT s ParserState m [Char]