[commit: packages/time] format-widths, master, posix-perf, tasty: Get benchmark working (08bb154)

git at git.haskell.org git at git.haskell.org
Mon Feb 20 21:19:15 UTC 2017


Repository : ssh://git@git.haskell.org/time

On branches: format-widths,master,posix-perf,tasty
Link       : http://git.haskell.org/packages/time.git/commitdiff/08bb154b73d0379b3a8023ff5fa5c6e828e45a2c

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

commit 08bb154b73d0379b3a8023ff5fa5c6e828e45a2c
Author: Ashley Yakeley <ashley at yakeley.org>
Date:   Tue Dec 6 02:10:15 2016 -0800

    Get benchmark working


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

08bb154b73d0379b3a8023ff5fa5c6e828e45a2c
 benchmark/Main.hs                  | 15 ++++-----------
 stack.yaml => benchmark/stack.yaml |  1 -
 benchmark/time-bench.cabal         |  2 ++
 3 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/benchmark/Main.hs b/benchmark/Main.hs
index 1be1b67..8eeb7a0 100644
--- a/benchmark/Main.hs
+++ b/benchmark/Main.hs
@@ -2,18 +2,11 @@
 module Main where
 
 import  Criterion.Main
-import  Data.Time.Clock
-import  Data.Time.Calendar
+import  Data.Time
 import  Data.Time.Clock.POSIX
-import  Data.Time.LocalTime
-import  Data.Time.Format
-import  Data.Time.Clock
 
-import qualified "time" Data.Time.Clock       as O
+import qualified "time" Data.Time             as O
 import qualified "time" Data.Time.Clock.POSIX as O
-import qualified "time" Data.Time.LocalTime   as O
-import qualified "time" Data.Time.Format      as O
-import qualified "time" Data.Time.Clock       as O
 
 main :: IO ()
 main = do
@@ -24,9 +17,9 @@ main = do
     getZonedTime >>= print
     O.getZonedTime >>= print
 
-    tz <- getCurrentTimeZone
+    _tz <- getCurrentTimeZone
     ct <- getCurrentTime
-    otz <- O.getCurrentTimeZone
+    _otz <- O.getCurrentTimeZone
     oct <- O.getCurrentTime
 
     defaultMain
diff --git a/stack.yaml b/benchmark/stack.yaml
similarity index 66%
copy from stack.yaml
copy to benchmark/stack.yaml
index e93eb5a..460c544 100644
--- a/stack.yaml
+++ b/benchmark/stack.yaml
@@ -1,4 +1,3 @@
 resolver: lts-6.26
 packages:
 - '.'
-allow-newer: true
diff --git a/benchmark/time-bench.cabal b/benchmark/time-bench.cabal
index 0a94ad4..9026ffe 100644
--- a/benchmark/time-bench.cabal
+++ b/benchmark/time-bench.cabal
@@ -10,6 +10,8 @@ build-type:          Simple
 executable time-bench
     hs-source-dirs: ../lib, .
     main-is: Main.hs
+    other-modules:
+        Data.Time.Clock.CTimespec
     default-language: Haskell2010
     if impl(ghc)
         default-extensions:



More information about the ghc-commits mailing list