Skip to content
This repository
Browse code

Restructured lens.cabal for consistency. Switched from ghc-prim to ge…

…neric-deriving for benchmarks.
  • Loading branch information...
commit 42bbe3031dde754d2b2897ade7ce15a6f4c3fab0 1 parent 42ba828
Edward Kmett authored January 26, 2013
6  benchmarks/plated.hs
@@ -13,11 +13,7 @@ import qualified Data.Generics.Uniplate.Direct as Uni
13 13
 import           Data.Generics.Uniplate.Direct ((|*))
14 14
 import qualified Data.Generics.Uniplate.DataOnly as UniDataOnly
15 15
 #endif
16  
-#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
17  
-import           GHC.Generics
18  
-#else
19  
-import           Generics.Deriving
20  
-#endif
  16
+import           Generics.Deriving hiding (universe)
21 17
 import           GHC.Generics.Lens as Generic
22 18
 
23 19
 data Expr  =  Val !Int
87  lens.cabal
@@ -275,25 +275,24 @@ library
275 275
     cpp-options: -DSAFE=1
276 276
 
277 277
   if flag(trustworthy) && impl(ghc>=7.2)
  278
+    other-extensions: Trustworthy
278 279
     cpp-options: -DTRUSTWORTHY=1
279 280
 
280  
-  if impl(ghc<7.4)
281  
-    ghc-options: -fno-spec-constr-count
282  
-
283  
-  if impl(ghc>=7.6.0.20120810)
284  
-    if flag(old-inline-pragmas)
  281
+  if flag(old-inline-pragmas) && impl(ghc>=7.6.0.20120810)
285 282
       cpp-options: -DOLD_INLINE_PRAGMAS=1
286 283
 
287 284
   if flag(inlining)
288 285
     cpp-options: -DINLINING
289 286
 
290  
-  if impl(ghc>=7.2)
291  
-    other-extensions: Trustworthy
292  
-    cpp-options: -DDEFAULT_SIGNATURES=1
293  
-
294 287
   if flag(lib-Werror)
295 288
     ghc-options: -Werror
296 289
 
  290
+  if impl(ghc<7.4)
  291
+    ghc-options: -fno-spec-constr-count
  292
+
  293
+  if impl(ghc>=7.2)
  294
+    cpp-options: -DDEFAULT_SIGNATURES=1
  295
+
297 296
   ghc-options: -Wall -fwarn-tabs -O2 -fdicts-cheap -funbox-strict-fields
298 297
   hs-source-dirs: src
299 298
 
@@ -301,15 +300,16 @@ library
301 300
 test-suite templates
302 301
   type: exitcode-stdio-1.0
303 302
   main-is: templates.hs
304  
-  build-depends:
305  
-    base,
306  
-    lens
  303
+  build-depends: base, lens
307 304
   ghc-options: -Wall -threaded
  305
+  hs-source-dirs: tests
  306
+
308 307
   if flag(dump-splices)
309 308
     ghc-options: -ddump-splices
  309
+
310 310
   if impl(ghc<7.6.1)
311 311
     ghc-options: -Werror
312  
-  hs-source-dirs: tests
  312
+
313 313
 
314 314
 -- Verify the properties of lenses with QuickCheck
315 315
 test-suite properties
@@ -317,6 +317,7 @@ test-suite properties
317 317
   main-is: properties.hs
318 318
   ghc-options: -w -threaded -rtsopts -with-rtsopts=-N
319 319
   hs-source-dirs: tests
  320
+
320 321
   if !flag(test-properties)
321 322
     buildable: False
322 323
   else
@@ -334,6 +335,7 @@ test-suite hunit
334 335
   main-is: hunit.hs
335 336
   ghc-options: -w -threaded -rtsopts -with-rtsopts=-N
336 337
   hs-source-dirs: tests
  338
+
337 339
   if !flag(test-hunit)
338 340
     buildable: False
339 341
   else
@@ -349,8 +351,11 @@ test-suite hunit
349 351
 
350 352
 -- Verify the results of the examples
351 353
 test-suite doctests
352  
-  type:    exitcode-stdio-1.0
353  
-  main-is: doctests.hs
  354
+  type:           exitcode-stdio-1.0
  355
+  main-is:        doctests.hs
  356
+  ghc-options:    -Wall -threaded
  357
+  hs-source-dirs: tests
  358
+
354 359
   if !flag(test-doctests)
355 360
     buildable: False
356 361
   else
@@ -358,50 +363,49 @@ test-suite doctests
358 363
       base,
359 364
       bytestring,
360 365
       containers,
361  
-      directory >= 1.0,
  366
+      directory      >= 1.0,
362 367
       deepseq,
363  
-      doctest >= 0.9.1,
  368
+      doctest        >= 0.9.1,
364 369
       filepath,
365 370
       mtl,
366 371
       nats,
367 372
       parallel,
368  
-      semigroups >= 0.9,
  373
+      semigroups     >= 0.9,
369 374
       simple-reflect >= 0.3.1,
370 375
       split,
371 376
       text,
372 377
       unordered-containers,
373 378
       vector
374 379
 
375  
-  ghc-options: -Wall -threaded
376 380
   if impl(ghc<7.6.1)
377 381
     ghc-options: -Werror
378  
-  hs-source-dirs: tests
  382
+
379 383
 
380 384
 -- Basic benchmarks for the uniplate-style combinators
381 385
 benchmark plated
382  
-  type: exitcode-stdio-1.0
383  
-  main-is: plated.hs
  386
+  type:           exitcode-stdio-1.0
  387
+  main-is:        plated.hs
  388
+  ghc-options:    -Wall -O2 -threaded -fdicts-cheap -funbox-strict-fields
  389
+  hs-source-dirs: benchmarks
384 390
   build-depends:
385 391
     base,
386 392
     comonad,
387 393
     criterion,
388 394
     deepseq,
  395
+    generic-deriving,
389 396
     lens,
390 397
     transformers
391  
-  if impl(ghc>=7.2)
392  
-    build-depends: ghc-prim
393  
-  else
394  
-    build-depends: generic-deriving
395  
-  ghc-options: -Wall -O2 -threaded -fdicts-cheap -funbox-strict-fields
396  
-  hs-source-dirs: benchmarks
  398
+
397 399
   if flag(benchmark-uniplate)
398 400
     build-depends: uniplate >= 1.6.7 && < 1.7
399 401
     cpp-options: -DBENCHMARK_UNIPLATE
400 402
 
401 403
 -- Benchmarking alongside variants
402 404
 benchmark alongside
403  
-  type: exitcode-stdio-1.0
404  
-  main-is: alongside.hs
  405
+  type:           exitcode-stdio-1.0
  406
+  main-is:        alongside.hs
  407
+  ghc-options:    -w -O2 -threaded -fdicts-cheap -funbox-strict-fields
  408
+  hs-source-dirs: benchmarks
405 409
   build-depends:
406 410
     base,
407 411
     comonad,
@@ -410,37 +414,36 @@ benchmark alongside
410 414
     deepseq,
411 415
     lens,
412 416
     transformers
413  
-  ghc-options: -w -O2 -threaded -fdicts-cheap -funbox-strict-fields
414  
-  hs-source-dirs: benchmarks
415 417
 
416 418
 -- Benchmarking unsafe implementation strategies
417 419
 benchmark unsafe
418  
-  type: exitcode-stdio-1.0
419  
-  main-is: unsafe.hs
  420
+  type:           exitcode-stdio-1.0
  421
+  main-is:        unsafe.hs
  422
+  ghc-options:    -w -O2 -threaded -fdicts-cheap -funbox-strict-fields
  423
+  hs-source-dirs: benchmarks
420 424
   build-depends:
421 425
     base,
422 426
     comonad,
423 427
     comonads-fd,
424 428
     criterion,
425 429
     deepseq,
426  
-    ghc-prim,
  430
+    generic-deriving,
427 431
     lens,
428 432
     transformers
429  
-  ghc-options: -w -O2 -threaded -fdicts-cheap -funbox-strict-fields
430  
-  hs-source-dirs: benchmarks
  433
+
431 434
 
432 435
 -- Benchmarking zipper usage
433 436
 benchmark zipper
434  
-  type: exitcode-stdio-1.0
435  
-  main-is: zipper.hs
  437
+  type:           exitcode-stdio-1.0
  438
+  main-is:        zipper.hs
  439
+  ghc-options:    -w -O2 -threaded -fdicts-cheap -funbox-strict-fields
  440
+  hs-source-dirs: benchmarks
436 441
   build-depends:
437 442
     base,
438 443
     comonad,
439 444
     comonads-fd,
440 445
     criterion,
441 446
     deepseq,
442  
-    ghc-prim,
  447
+    generic-deriving,
443 448
     lens,
444 449
     transformers
445  
-  ghc-options: -w -O2 -threaded -fdicts-cheap -funbox-strict-fields
446  
-  hs-source-dirs: benchmarks

0 notes on commit 42bbe30

Please sign in to comment.
Something went wrong with that request. Please try again.