acme-year 2013 → 2014
raw patch · 3 files changed
+24/−4 lines, 3 filesdep +criteriondep ~base
Dependencies added: criterion
Dependency ranges changed: base
Files
- Acme/Year.hs +1/−1
- acme-year.cabal +15/−3
- bench/Main.hs +8/−0
Acme/Year.hs view
@@ -5,7 +5,7 @@ import Data.Version import Paths_acme_year --- | The current year (e.g. @2013@)+-- | The current year (e.g. @2014@) currentYear :: Int currentYear = case versionBranch version of
acme-year.cabal view
@@ -1,5 +1,5 @@ name: acme-year-version: 2013+version: 2014 synopsis: Get the current year -- description: license: PublicDomain@@ -24,13 +24,25 @@ ghc-options: -Wall -fwarn-tabs test-suite test- type: exitcode-stdio-1.0+ type: exitcode-stdio-1.0 hs-source-dirs: test main-is: Main.hs ghc-options: -Wall -fwarn-tabs - build-depends: base < 6+ build-depends: base , acme-year , time++benchmark bench+ type: exitcode-stdio-1.0++ hs-source-dirs: bench+ main-is: Main.hs++ ghc-options: -Wall -fwarn-tabs -O2++ build-depends: base+ , acme-year+ , criterion
+ bench/Main.hs view
@@ -0,0 +1,8 @@+import Acme.Year+import Criterion.Main++main :: IO ()+main = defaultMain+ [ bench "control" (return 1234 :: IO Int)+ , bench "currentYear" (return currentYear :: IO Int)+ ]