[commit: packages/pretty] new-pretty, typeclass-pretty: Some changes to Bench1 (0e91ce8)
git at git.haskell.org
git at git.haskell.org
Fri Jan 23 22:48:29 UTC 2015
Repository : ssh://git@git.haskell.org/pretty
On branches: new-pretty,typeclass-pretty
Link : http://git.haskell.org/packages/pretty.git/commitdiff/0e91ce85dae1724d8a6179d355e5dfd25cabb7e4
>---------------------------------------------------------------
commit 0e91ce85dae1724d8a6179d355e5dfd25cabb7e4
Author: David Terei <davidterei at gmail.com>
Date: Wed Aug 24 15:10:21 2011 -0700
Some changes to Bench1
>---------------------------------------------------------------
0e91ce85dae1724d8a6179d355e5dfd25cabb7e4
Bench1.hs | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/Bench1.hs b/Bench1.hs
index 09a1d14..c3a0661 100644
--- a/Bench1.hs
+++ b/Bench1.hs
@@ -1,8 +1,7 @@
module Main where
--- import Text.PrettyPrint.HughesPJ
-import Text.PrettyPrint2
-import Text.PrettyPrint.Internal
+import Text.PrettyPrint.HughesPJ
+-- import Pretty
stuff :: String -> String -> Double -> Rational -> Int -> Int -> Int -> Doc
stuff s1 s2 d1 r1 i1 i2 i3 =
@@ -29,15 +28,17 @@ doc2 = stuff "aDSAS ADS asdasdsa sdsda xx" "SDAB WEEAA" 1333.212 ((-4)/5) 31 301
doc3 :: Doc
doc3 = stuff "ADsAs --____ aDS" "DasSdAB weEAA" 2533.21299 ((-4)/999) 39 399 60
+{-
txt :: TextDetails -> String -> String
txt (Chr c) s = c:s
txt (Str s1) s2 = s1 ++ s2
-txt (PStr s1) s2 = s1 ++ s2
+-}
main :: IO ()
main = do
putStrLn "==================================================="
putStrLn $ render doc1
+{-
putStrLn "==================================================="
putStrLn $ fullRender PageMode 1000 4 txt "" doc2
putStrLn "==================================================="
@@ -49,6 +50,7 @@ main = do
putStrLn "==================================================="
putStrLn $ fullRender OneLineMode 1000 4 txt "" doc3
putStrLn "==================================================="
+-}
putStrLn $ render doc3
More information about the ghc-commits
mailing list