[commit: dph] master: Adjust format of measureD tracing messages (969d2b6)

Ben Lippmeier benl at ouroborus.net
Wed Apr 13 08:04:16 CEST 2011


Repository : ssh://darcs.haskell.org//srv/darcs/packages/dph

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/969d2b6a57e3e063235a3a53de26d556366c3d66

>---------------------------------------------------------------

commit 969d2b6a57e3e063235a3a53de26d556366c3d66
Author: benl23 <benl at ouroborus.net>
Date:   Tue Apr 12 18:59:13 2011 +1000

    Adjust format of measureD tracing messages

>---------------------------------------------------------------

 .../Array/Parallel/Unlifted/Distributed/Types.hs   |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dph-prim-par/Data/Array/Parallel/Unlifted/Distributed/Types.hs b/dph-prim-par/Data/Array/Parallel/Unlifted/Distributed/Types.hs
index ac73554..0ff4de4 100644
--- a/dph-prim-par/Data/Array/Parallel/Unlifted/Distributed/Types.hs
+++ b/dph-prim-par/Data/Array/Parallel/Unlifted/Distributed/Types.hs
@@ -99,7 +99,7 @@ class DT a where
   sizeMD :: MDist a s -> Int
 
   measureD :: a -> String
-  measureD _ = "?"
+  measureD _ = "None"
 
 -- Distributed values must always be hyperstrict.
 -- instance DT a => HS (Dist a)
@@ -224,7 +224,7 @@ instance DT Int where
   sizeD          = primSizeD
   sizeMD         = primSizeMD
 
-  measureD n = "int " ++ show n
+  measureD n = "Int " ++ show n
 
 instance DPrim Word8 where
   mkDPrim            = DWord8
@@ -302,7 +302,7 @@ instance (DT a, DT b) => DT (a,b) where
   sizeD  (DProd  x _) = sizeD  x
   sizeMD (MDProd x _) = sizeMD x
 
-  measureD (x,y) = "(" ++ measureD x ++ "," ++ measureD y ++ ")"
+  measureD (x,y) = "Pair " ++ "(" ++ measureD x ++ ") (" ++  measureD y ++ ")"
 
 instance DT a => DT (Maybe a) where
   data Dist  (Maybe a)   = DMaybe  !(Dist  Bool)   !(Dist  a)
@@ -408,7 +408,7 @@ instance DT USegd where
   sizeD  (DUSegd  _ _ eles) = sizeD eles
   sizeMD (MDUSegd _ _ eles) = sizeMD eles
 
-  measureD segd = "Segd " ++ show (lengthUSegd segd) ++ "|" ++ show (elementsUSegd segd)
+  measureD segd = "Segd " ++ show (lengthUSegd segd) ++ " " ++ show (elementsUSegd segd)
 
 lengthUSegdD :: Dist USegd -> Dist Int
 {-# INLINE_DIST lengthUSegdD #-}





More information about the Cvs-libraries mailing list