data-pprint 0.2.1.5 → 0.2.2
raw patch · 2 files changed
+10/−4 lines, 2 files
Files
- Data/PPrint.hs +8/−2
- data-pprint.cabal +2/−2
Data/PPrint.hs view
@@ -22,8 +22,14 @@ -- The exceptions are shown as bottom signs -- followed by explanations. pprint :: Data a => a -> IO Doc-pprint x = do- x <- eval 1 700 x+pprint = pprintTo 700++-- |Prettyprint a 'Data' value, showing up to approximately+-- the specified number of characters. Use this to show+-- more than the default pprint allows.+pprintTo :: Data a => Int -> a -> IO Doc+pprintTo max x = do+ x <- eval 1 max x let ([x'], es) = numberErrors [x] return $ toDoc x' $+$ nest 2 (showBotts es)
data-pprint.cabal view
@@ -1,5 +1,5 @@ name: data-pprint-version: 0.2.1.5+version: 0.2.2 category: Testing, Text synopsis: Prettyprint and compare Data values description:@@ -22,7 +22,7 @@ Usage examples: . > pprint [1..]- > pprint $ repeat [1..]+ > pprintTo 10000 $ repeat [1..] > pprint $ iterate (*10) 1 > pprint $ map length $ replicate 5 [1..] ++ repeat [] > pprint [2 `div` 0, error "xxx", 18, 4 `div` 0]