ppList :: Pretty a => Int -> [a] -> Doc
ppList width = vcat 
             . appendComma 
             . map (hcat . intersperse comma . map pp) 
             . blow'
  where blow' :: [a] -> [[a]]
        blow' xs = case splitAt width xs of
                     (px, []) -> [px]
                     (px, pm) -> px : blow' pm
        appendComma :: [Doc] -> [Doc]
        appendComma []     = []
        appendComma (x:xs) = ((text "[" <> x) : map (comma <>) xs) ++ [text "]"]
ppList :: Pretty a => Int -> [a] -> Doc
ppList width = vcat 
             . appendComma 
             . map (hcat . intersperse comma . map pp) 
             . blow'
  where blow' :: [a] -> [[a]]
        blow' xs = case splitAt width xs of
                     (px, []) -> [px]
                     (px, pm) -> px : blow' pm
        appendComma :: [Doc] -> [Doc]
        appendComma []     = []
        appendComma (x:xs) = ((text "[" <> x) : map (comma <>) xs) ++ [text "]"]
ppList width = vcat 
             . appendComma 
             . map (hcat . intersperse comma . map pp) 
             . blow'
  where blow' :: [a] -> [[a]]
        blow' xs = case splitAt width xs of
                     (px, []) -> [px]
                     (px, pm) -> px : blow' pm
        appendComma :: [Doc] -> [Doc]
        appendComma []     = []
        appendComma (x:xs) = ((text "[" <> x) : map (comma <>) xs) ++ [text "]"]