dph-lifted-base: in tracing code, print operator name before anything else.
authorBen Lippmeier <benl@ouroborus.net>
Fri, 9 Dec 2011 07:24:12 +0000 (18:24 +1100)
committerBen Lippmeier <benl@ouroborus.net>
Fri, 9 Dec 2011 07:24:12 +0000 (18:24 +1100)
Previously, if the array pretty printer died we got nothing

dph-lifted-base/Data/Array/Parallel/PArray/Reference.hs

index fa495b4..1f6d573 100644 (file)
@@ -74,9 +74,8 @@ withRef1 name arrRef arrImpl
 withRef1' name arrRef arrImpl
  = unsafePerformIO
  $ do   when debugLiftedTrace
-         $ do putStrLn  $   render
-                        $   text "* " <> text name
-                        $+$ (nest 4 $ pprp1 arrImpl)
+         $ do putStrLn  $ "* " ++ name
+              putStrLn  $ render (nest 4 $ pprp1 arrImpl)
               hFlush stdout
         
         when ( debugLiftedCompare 
@@ -114,9 +113,8 @@ withRef2 name arrRef arrImpl
 withRef2' name arrRef arrImpl
  = unsafePerformIO
  $ do   when debugLiftedTrace
-         $ do putStrLn  $  render
-                        $  text "* " <> text name
-                        $+$ (nest 4 $ pprp1 arrImpl)
+         $ do putStrLn  $ "* " ++ name
+              putStrLn  $ render (nest 4 $ pprp1 arrImpl)
               hFlush stdout
 
         when ( debugLiftedCompare