2 -- Copyright 2008 the Contributors, as shown in the revision logs.
3 -- Licensed under the Apache Public Source License 2.0 ("the License").
4 -- You may not use this file except in compliance with the License.
8 import Edu_Berkeley_Sbp_Haskell_SBP
13 import qualified Text.PrettyPrint.Leijen as PP
15 process :: String -> IO String
16 process file = do t <- parseFile file
19 $ ((fromTree $ coalesceFlatHeadlessNodes t) :: Doc)
21 foreign import jvm safe "HaskellHelper.putBack" putBack :: JString -> IO ()
23 main' file verbosity =
24 do t <- parseFile file
27 putStrLn $ (PP.displayS
28 $ PP.renderPretty (0.9) 80
29 $ prettyPrintTree (coalesceFlatHeadlessNodes t))
33 doc <- return ((fromTree $ coalesceFlatHeadlessNodes t) :: Doc)
36 putStrLn $ (PP.displayS
37 $ PP.renderPretty (0.9) 80
42 js <- packJString $ toHtml doc