On Fri, 5 Sep 2008, Eric Kow wrote:

On Fri, Sep 05, 2008 at 15:52:45 +0100, Eric Kow wrote:
On Fri, Sep 05, 2008 at 10:28:41 -0400, David Roundy wrote:
I think this is a very bad idea.  If benchmarking is going to be
useful, it really should run with different versions of ghc.  This
might, for instance, have allowed us to catch the huge ghc 6.8
regression before ghc 6.8.2.

Makes sense.  Ganesh, would you mind sending your patches for benchpress
and maybench?

Whoops! I just realised that my first paragraph was awfully unclear.

What I meant is that Ganesh had some patches to benchpress and maybench which allowed the two to compile on GHC 6.6. So hopefully we will have support for whatever GHC darcs can support (except for 6.4, but that is under discussion).

The patches were trivial. I've lost the maybench one but I think that was just replacing some {-# LANGUAGE .. #-} pragma with {-# OPTIONS_GHC -fglasgow-exts #-}. The benchpress one is attached, though I don't know if the build-depends condition loosening is actually correct.

However, while I agree that benchmarking old and new versions of GHC in future is worthwhile, I don't really see any point in jumping through hoops to benchmark 6.6 unless we actually think there are further regressions in 6.8 over it. The changes I made all come at the cost of making the code uglier (except for the build-depends conditions).

Ganesh
diff --git a/Test/BenchPress.hs b/Test/BenchPress.hs
index efac51a..f79d40c 100644
--- a/Test/BenchPress.hs
+++ b/Test/BenchPress.hs
@@ -62,7 +62,7 @@ module Test.BenchPress
 
 import Control.Exception (bracket)
 import Control.Monad (forM, forM_)
-import Data.List (intercalate, sort)
+import Data.List (intersperse, sort)
 import Data.Time.Clock (NominalDiffTime, diffUTCTime, getCurrentTime)
 import qualified Math.Statistics as Math
 import Prelude hiding (max, min)
@@ -70,6 +70,8 @@ import qualified Prelude
 import System.CPUTime (getCPUTime)
 import Text.Printf (printf)
 
+intercalate x = concat . intersperse x
+
 -- ---------------------------------------------------------------------
 -- Running a benchmark
 
diff --git a/benchpress.cabal b/benchpress.cabal
index 3f15374..4904fbd 100644
--- a/benchpress.cabal
+++ b/benchpress.cabal
@@ -1,5 +1,5 @@
 name:           benchpress
-version:        0.2.2
+version:        0.2.2.1
 synopsis:       Micro-benchmarking with detailed statistics.
 Description:    Benchmarks actions and produces statistics
                 such as min, mean, median, standard deviation,
@@ -19,8 +19,8 @@ library
 
   other-modules:  Math.Statistics
 
-  build-depends:  base >= 2.1 && < 3.1,
+  build-depends:  base >= 2.0 && < 3.1,
                   mtl >= 1 && < 1.2,
-                  time >= 1.1 && < 1.2
+                  time >= 1.0 && < 1.2
 
   ghc-options:  -funbox-strict-fields -Wall
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to