packages feed

parconc-examples-0.4.3: parconc-examples.cabal

name:                parconc-examples
version:             0.4.3
synopsis:            Examples to accompany the book "Parallel and Concurrent Programming in Haskell"
-- description:         
license:             BSD3
license-file:        LICENSE
author:              Simon Marlow
maintainer:          Simon Marlow <marlowsd@gmail.com>
copyright:           (c) Simon Marlow 2011-2013
category:            Sample Code
build-type:          Simple
cabal-version:       >=1.10
bug-reports:         https://github.com/simonmar/parconc-examples/issues
homepage:            http://github.com/simonmar/parconc-examples

extra-source-files:  sudoku17.1000.txt
                     sudoku17.16000.txt
                     sudoku17.49151.txt
                     chanbench.hs
                     findpar5.hs
                     parlist.hs
                     other/correcter.hs
                     other/arithgame.hs
                     other/game.hs
                     other/README
                     distrib-db/WorkerSample.hs
                     distrib-db/DatabaseSample.hs
                     sudoku-par1.hs
                     sudoku-par2.hs
                     sudoku-par3.hs
                     sudoku-par4.hs
                     kmeans/Makefile
                     timeout2.hs
                     parinfer/benchmark.in
                     tmvar.hs
                     windowman.hs
                     ChangeLog.md
                     README.md

source-repository head
    type:     git
    location: https://github.com/simonmar/parconc-examples.git

-- -----------------------------------------------------------------------------
-- Flags

-- -f llvm: enable -fllvm to GHC; requires LLVM to be installed, but
-- makes the Repa programs faster

flag llvm
  default: False

-- -f devil: Enable the image-maniputation programs, which are
-- disabled by default because they require the devil library which
-- needs to be installed separately.

flag devil
  default: False

-- -f cuda: Build the examples that require accelerate-cuda.  These
-- need the NVidia CUDA tools installed.

flag cuda
  default: False

-- -f-accelerate: Do not build the examples that require accelerate.

flag accelerate
  default : True

-- -f-distributed: Do not build the examples that require distributed-process.

flag distributed
  default : True

-- -f network26: Use network-2.6.  Internal flag; you shouldn't need
-- to change this.

flag network26
  default : True

-- -----------------------------------------------------------------------------
-- par-eval

executable rpar
  main-is: rpar.hs
  build-depends:   base >= 4.5 && < 4.9
                 , time >= 1.4 && < 1.6
                 , parallel ==3.2.*
  default-language: Haskell2010

executable sudoku1
  main-is: sudoku1.hs
  other-modules: Sudoku
  build-depends:   base >= 4.5 && < 4.9
                 , parallel ==3.2.*
                 , array >= 0.4 && <0.6
  default-language: Haskell2010

executable sudoku2
  main-is: sudoku2.hs
  other-modules: Sudoku
  build-depends:   base >= 4.5 && < 4.9
                 , parallel ==3.2.*
                 , array >= 0.4 && <0.6
                 , deepseq >= 1.3 && < 1.5
  ghc-options: -threaded
  default-language: Haskell2010

executable sudoku3
  main-is: sudoku3.hs
  other-modules: Sudoku
  build-depends:   base >= 4.5 && < 4.9
                 , parallel ==3.2.*
                 , array >= 0.4 && <0.6
  ghc-options: -threaded
  default-language: Haskell2010

executable sudoku4
  main-is: sudoku4.hs
  other-modules: Sudoku
  build-depends:   base >= 4.5 && < 4.9
                 , parallel ==3.2.*
                 , array >= 0.4 && <0.6
  ghc-options: -threaded
  default-language: Haskell2010

executable sudoku5
  main-is: sudoku5.hs
  other-modules: Sudoku
  build-depends:   base >= 4.5 && < 4.9
                 , parallel ==3.2.*
                 , array >= 0.4 && <0.6
  ghc-options: -threaded
  default-language: Haskell2010

-- -----------------------------------------------------------------------------
-- par-strat

executable strat
  main-is: strat.hs
  build-depends:   base >= 4.5 && < 4.9
                 , parallel ==3.2.*
  ghc-options: -threaded
  default-language: Haskell2010

executable strat2
  main-is: strat2.hs
  build-depends:   base >= 4.5 && < 4.9
                 , parallel ==3.2.*
  ghc-options: -threaded
  default-language: Haskell2010

executable strat3
  main-is: strat3.hs
  build-depends:   base >= 4.5 && < 4.9
                 , parallel ==3.2.*
  ghc-options: -threaded
  default-language: Haskell2010

executable rsa
  main-is: rsa.hs
  other-modules: ByteStringCompat
  build-depends:   base >= 4.5 && < 4.9
                 , bytestring >= 0.9 && < 0.11
                 , deepseq >= 1.3 && < 1.5
  default-language: Haskell2010

executable rsa1
  main-is: rsa1.hs
  other-modules: ByteStringCompat
  build-depends:   base >= 4.5 && < 4.9
                 , bytestring >= 0.9 && < 0.11
                 , parallel ==3.2.*
                 , deepseq >= 1.3 && < 1.5
  ghc-options: -threaded
  default-language: Haskell2010

executable rsa2
  main-is: rsa2.hs
  other-modules: ByteStringCompat
  build-depends:   base >= 4.5 && < 4.9
                 , bytestring >= 0.9 && < 0.11
                 , parallel ==3.2.*
                 , deepseq >= 1.3 && < 1.5
  ghc-options: -threaded
  default-language: Haskell2010

executable kmeans
  hs-source-dirs: kmeans
  main-is: kmeans.hs
  other-modules: KMeansCore
  build-depends:   base >= 4.5 && < 4.9
                 , parallel ==3.2.*
                 , time >= 1.4 && < 1.6
                 , deepseq >= 1.3 && < 1.5
                 , monad-par >= 0.3.4 && < 0.4
                   -- monad-par 0.3 has a bug:
                   -- https://github.com/simonmar/monad-par/issues/23
                 , binary >=0.6.3 && < 0.8
                 , array >= 0.4 && <0.6
                 , bytestring >= 0.9 && < 0.11
                 , vector >= 0.10 && < 0.12
  ghc-options: -threaded
  default-language: Haskell2010

executable GenSamples
  hs-source-dirs: kmeans
  main-is: GenSamples.hs
  other-modules: KMeansCore
  build-depends:   base >= 4.5 && < 4.9
                 , binary >=0.6.3 && < 0.8
                 , array >= 0.4 && <0.6
                 , vector >= 0.10 && < 0.12
                 , random >= 1.0 && < 1.2
                 , normaldistribution >= 1.1 && < 1.2
                 , deepseq >= 1.3 && < 1.5
                 , bytestring >= 0.9 && < 0.11
  default-language: Haskell2010

-- -----------------------------------------------------------------------------
-- par-monad

executable parmonad
  main-is: parmonad.hs
  build-depends:   base >= 4.5 && < 4.9
                 , monad-par >= 0.3.4 && < 0.4
  ghc-options: -threaded
  default-language: Haskell2010

executable rsa-pipeline
  main-is: rsa-pipeline.hs
  other-modules: ByteStringCompat Stream
  build-depends:   base >= 4.5 && < 4.9
                 , bytestring >= 0.9 && < 0.11
                 , monad-par >= 0.3.4 && < 0.4
                 , deepseq >= 1.3 && < 1.5
  ghc-options: -threaded
  default-language: Haskell2010

executable fwsparse
  main-is: fwsparse.hs
  other-modules: SparseGraph MapCompat
  hs-source-dirs: fwsparse
  build-depends:   base >= 4.5 && < 4.9
                 , random >= 1.0 && < 1.2
                 , array >= 0.4 && <0.6
                 , containers >= 0.4 && < 0.6
  default-language: Haskell2010

executable fwsparse1
  main-is: fwsparse1.hs
  other-modules: SparseGraph MapCompat
  hs-source-dirs: fwsparse
  build-depends:   base >= 4.5 && < 4.9
                 , random >= 1.0 && < 1.2
                 , array >= 0.4 && <0.6
                 , containers >= 0.4 && < 0.6
                 , monad-par >= 0.3.4 && < 0.4
                 , deepseq >= 1.3 && < 1.5
  ghc-options: -threaded
  default-language: Haskell2010

executable  timetable
  main-is: timetable.hs
  build-depends:   base >= 4.5 && < 4.9
                 , containers >= 0.4 && < 0.6
                 , deepseq >= 1.3 && < 1.5
                 , random >= 1.0 && < 1.2
  default-language: Haskell2010

executable  timetable1
  main-is: timetable1.hs
  build-depends:   base >= 4.5 && < 4.9
                 , containers >= 0.4 && < 0.6
                 , deepseq >= 1.3 && < 1.5
                 , monad-par >= 0.3.4 && < 0.4
                 , random >= 1.0 && < 1.2
  default-language: Haskell2010

executable  timetable2
  main-is: timetable2.hs
  build-depends:   base >= 4.5 && < 4.9
                 , containers >= 0.4 && < 0.6
                 , deepseq >= 1.3 && < 1.5
                 , monad-par >= 0.3.4 && < 0.4
                 , random >= 1.0 && < 1.2
  default-language: Haskell2010

executable  timetable3
  main-is: timetable3.hs
  build-depends:   base >= 4.5 && < 4.9
                 , containers >= 0.4 && < 0.6
                 , deepseq >= 1.3 && < 1.5
                 , monad-par >= 0.3.4 && < 0.4
                 , random >= 1.0 && < 1.2
  default-language: Haskell2010

executable  parinfer
  main-is: parinfer.hs
  hs-source-dirs: parinfer
  other-modules:  InferMonad
                  Term
                  FiniteMap
                  Shows
                  Environment
                  Lex
                  MaybeM
                  Parse
                  MyList
                  Type
                  Infer
                  Substitution
                  StateX
  build-depends:   base >= 4.5 && < 4.9
                 , containers >= 0.4 && < 0.6
                 , deepseq >= 1.3 && < 1.5
                 , monad-par >= 0.3.4 && < 0.4
                 , array >= 0.4 && <0.6
  default-language: Haskell2010

-- -----------------------------------------------------------------------------
-- par-repa

executable  fwdense
  main-is: fwdense.hs
  build-depends:   base >= 4.5 && < 4.9
                 , repa >= 3.2 && < 3.5
  ghc-options: -O2
  if flag(llvm)
     ghc-options: -fllvm
  default-language: Haskell2010

executable  fwdense1
  main-is: fwdense1.hs
  build-depends:   base >= 4.5 && < 4.9
                 , repa >= 3.2 && < 3.5
                 , transformers >=0.3 && <0.5
  ghc-options: -O2 -threaded
  if flag(llvm)
     ghc-options: -fllvm
  default-language: Haskell2010

executable rotateimage
  main-is: rotateimage.hs
  build-depends:   base >= 4.5 && < 4.9
                 , repa >= 3.2 && < 3.5
  ghc-options: -O2 -threaded
  if flag(devil)
     build-depends: repa-devil == 0.3.*
  else
     buildable: False
  if flag(llvm)
     ghc-options: -fllvm
  default-language: Haskell2010

-- -----------------------------------------------------------------------------
-- par-accel

executable  fwaccel
  main-is: fwaccel.hs
  other-modules: AccelerateCompat
  build-depends:   base >= 4.5 && < 4.9
  ghc-options: -O2
  if flag(accelerate)
     build-depends: accelerate >= 0.12 && < 0.16
  else
     buildable: False
  default-language: Haskell2010

executable  fwaccel-gpu
  main-is: fwaccel-gpu.hs
  build-depends:   base >= 4.5 && < 4.9
  if flag(accelerate)
     build-depends: accelerate >= 0.12 && < 0.16
  else
     buildable: False
  if flag(cuda)
     build-depends: accelerate-cuda >= 0.12 && < 0.15
  else
     buildable: False
  ghc-options: -O2
  default-language: Haskell2010

executable  mandel
  main-is: mandel.hs
  other-modules: Config
  hs-source-dirs: mandel
  build-depends:   base >= 4.5 && < 4.9
                 , fclabels
  if flag(accelerate)
     build-depends: accelerate >= 0.12 && < 0.16
                  , accelerate-io
  else
     buildable: False
  if flag(cuda)
     build-depends: accelerate-cuda >= 0.12 && < 0.15
  else
     buildable: False
  ghc-options: -O2
  default-language: Haskell2010

-- -----------------------------------------------------------------------------
-- conc-fork

executable  fork
  main-is: fork.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

executable  reminders
  main-is: reminders.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

executable  reminders2
  main-is: reminders2.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

-- -----------------------------------------------------------------------------
-- conc-mvar

executable  mvar1
  main-is: mvar1.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

executable  mvar2
  main-is: mvar2.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

executable  mvar3
  main-is: mvar3.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

executable  logger
  main-is: logger.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

executable  phonebook
  main-is: phonebook.hs
  build-depends:   base >= 4.5 && < 4.9
                 , containers >= 0.4 && < 0.6
  default-language: Haskell2010

executable  chan
  main-is: chan.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

executable  chan2
  main-is: chan2.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

-- -----------------------------------------------------------------------------
-- conc-overlap

executable geturls1
  main-is: geturls1.hs
  other-modules: GetURL
  build-depends:   base >= 4.5 && < 4.9
                 , containers >= 0.4 && < 0.6
                 , HTTP ==4000.2.*
                 , bytestring >= 0.9 && < 0.11
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

executable  geturls2
  main-is: geturls2.hs
  other-modules: GetURL
  build-depends:   base >= 4.5 && < 4.9
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time >= 1.4 && < 1.6
                 , HTTP ==4000.2.*
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

executable  geturls3
  main-is: geturls3.hs
  other-modules: TimeIt GetURL
  build-depends:   base >= 4.5 && < 4.9
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time >= 1.4 && < 1.6
                 , HTTP ==4000.2.*
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

executable  geturls4
  main-is: geturls4.hs
  other-modules: GetURL
  build-depends:   base >= 4.5 && < 4.9
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time >= 1.4 && < 1.6
                 , HTTP ==4000.2.*
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

executable  geturls5
  main-is: geturls5.hs
  other-modules: GetURL
  build-depends:   base >= 4.5 && < 4.9
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time >= 1.4 && < 1.6
                 , HTTP ==4000.2.*
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

executable  geturls6
  main-is: geturls6.hs
  other-modules: TimeIt GetURL
  build-depends:   base >= 4.5 && < 4.9
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time >= 1.4 && < 1.6
                 , HTTP ==4000.2.*
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

-- -----------------------------------------------------------------------------
-- conc-asyncex

executable  geturlscancel
  main-is: geturlscancel.hs
  other-modules: TimeIt GetURL
  build-depends:   base >= 4.5 && < 4.9
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time >= 1.4 && < 1.6
                 , HTTP ==4000.2.*
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

executable  geturlscancel2
  main-is: geturlscancel2.hs
  other-modules: TimeIt GetURL
  build-depends:   base >= 4.5 && < 4.9
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time >= 1.4 && < 1.6
                 , HTTP ==4000.2.*
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

executable  modifytwo
  main-is: modifytwo.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

executable  chan3
  main-is: chan3.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

executable  timeout
  main-is: timeout.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

executable  catch-mask
  main-is: catch-mask.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

executable  catch-mask2
  main-is: catch-mask2.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

-- -----------------------------------------------------------------------------
-- conc-stm

executable  miscmodules
  main-is: miscmodules.hs
  other-modules: TMVar, TList, TQueue, TBQueue, WindowManager
  build-depends:   base >= 4.5 && < 4.9
                 , containers >= 0.4 && < 0.6
                 , stm ==2.4.*
  default-language: Haskell2010

executable  geturlsfirst
  main-is: geturlsfirst.hs
  other-modules: ConcurrentUtils, GetURL
  build-depends:   base >= 4.5 && < 4.9
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time >= 1.4 && < 1.6
                 , HTTP ==4000.2.*
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

executable  TChan
  main-is: TChan.hs
  build-depends:   base >= 4.5 && < 4.9
                 , stm ==2.4.*
  default-language: Haskell2010

-- -----------------------------------------------------------------------------
-- conc-higher

executable  geturls7
  main-is: geturls7.hs
  other-modules: ConcurrentUtils, GetURL
  build-depends:   base >= 4.5 && < 4.9
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time >= 1.4 && < 1.6
                 , HTTP ==4000.2.*
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

executable  geturls8
  main-is: geturls8.hs
  other-modules: Async, GetURL
  build-depends:   base >= 4.5 && < 4.9
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time >= 1.4 && < 1.6
                 , HTTP ==4000.2.*
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

executable  geturls9
  main-is: geturls9.hs
  other-modules: Async, GetURL
  build-depends:   base >= 4.5 && < 4.9
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time >= 1.4 && < 1.6
                 , HTTP ==4000.2.*
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

executable  timeout2
  main-is: timeout.hs
  build-depends:   base >= 4.5 && < 4.9
                 , async ==2.0.*
  default-language: Haskell2010

-- -----------------------------------------------------------------------------
-- conc-par

executable findseq
  main-is: findseq.hs
  build-depends:   base >= 4.5 && < 4.9
                 , filepath >= 1.3 && < 1.5
                 , directory >= 1.1 && < 1.3
  default-language: Haskell2010

executable findpar
  main-is: findpar.hs
  ghc-options: -threaded
  build-depends:   base >= 4.5 && < 4.9
                 , filepath >= 1.3 && < 1.5
                 , directory >= 1.1 && < 1.3
                 , async ==2.0.*
  default-language: Haskell2010

executable findpar2
  main-is: findpar2.hs
  ghc-options: -threaded
  build-depends:   base >= 4.5 && < 4.9
                 , filepath >= 1.3 && < 1.5
                 , directory >= 1.1 && < 1.3
                 , async ==2.0.*
  default-language: Haskell2010

executable findpar3
  main-is: findpar3.hs
  other-modules: CasIORef
  ghc-options: -threaded
  build-depends:   base >= 4.5 && < 4.9
                 , filepath >= 1.3 && < 1.5
                 , directory >= 1.1 && < 1.3
                 , async ==2.0.*
                 , stm ==2.4.*
  default-language: Haskell2010

executable findpar4
  main-is: findpar4.hs
  ghc-options: -threaded
  build-depends:   base >= 4.5 && < 4.9
                 , filepath >= 1.3 && < 1.5
                 , directory >= 1.1 && < 1.3
                 , async ==2.0.*
                 , stm ==2.4.*
                 , transformers >=0.3 && <0.5
                 , abstract-par ==0.3.*
                 , monad-par >= 0.3.4 && < 0.4
  default-language: Haskell2010

executable findpar5
  main-is: findpar5.hs
  ghc-options: -threaded
  build-depends:   base >= 4.5 && < 4.9
                 , filepath >= 1.3 && < 1.5
                 , directory >= 1.1 && < 1.3
                 , transformers >=0.3 && <0.5
                 , abstract-par ==0.3.*
                 , monad-par >= 0.3.4 && < 0.4
  default-language: Haskell2010

-- -----------------------------------------------------------------------------
-- conc-server

executable  server
  main-is: server.hs
  other-modules: ConcurrentUtils
  build-depends:   base >= 4.5 && < 4.9
                 , stm ==2.4.*
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

executable  server2
  main-is: server2.hs
  other-modules: ConcurrentUtils
  build-depends:   base >= 4.5 && < 4.9
                 , stm ==2.4.*
                 , async ==2.0.*
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

executable chat
  main-is: chat.hs
  other-modules: ConcurrentUtils
  build-depends:   base >= 4.5 && < 4.9
                 , containers >= 0.4 && < 0.6
                 , async ==2.0.*
                 , stm ==2.4.*
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

-- -----------------------------------------------------------------------------
-- conc-distrib

executable ping
  main-is: distrib-ping/ping.hs
  other-modules: DistribUtils
  build-depends:   base >= 4.5 && < 4.9
                 , binary >=0.6.3 && < 0.8
                 , template-haskell >= 2.7 && < 2.11
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  if impl(ghc <= 7.6)
      -- prior to ghc-7.4 generics lived in ghc-prim
      build-depends: ghc-prim
  if flag(distributed)
     build-depends:
                   distributed-process == 0.5.*
                 , distributed-process-simplelocalnet ==0.2.*
                 , distributed-static >= 0.2 && < 0.4
  else
     buildable: False
  default-language: Haskell2010

executable ping-multi
  main-is: distrib-ping/ping-multi.hs
  other-modules: DistribUtils
  build-depends:   base >= 4.5 && < 4.9
                 , binary >=0.6.3 && < 0.8
                 , template-haskell >= 2.7 && < 2.11
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  if impl(ghc <= 7.6)
      -- prior to ghc-7.4 generics lived in ghc-prim
      build-depends: ghc-prim
  if flag(distributed)
     build-depends:
                   distributed-process == 0.5.*
                 , distributed-process-simplelocalnet ==0.2.*
                 , distributed-static >= 0.2 && < 0.4
  else
     buildable: False
  default-language: Haskell2010

executable ping-tc
  main-is: distrib-ping/ping-tc.hs
  other-modules: DistribUtils
  build-depends:   base >= 4.5 && < 4.9
                 , binary >=0.6.3 && < 0.8
                 , template-haskell >= 2.7 && < 2.11
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  if impl(ghc <= 7.6)
      -- prior to ghc-7.4 generics lived in ghc-prim
      build-depends: ghc-prim
  if flag(distributed)
     build-depends:
                   distributed-process == 0.5.*
                 , distributed-process-simplelocalnet ==0.2.*
                 , distributed-static >= 0.2 && < 0.4
  else
     buildable: False
  default-language: Haskell2010

executable ping-tc-merge
  main-is: distrib-ping/ping-tc-merge.hs
  other-modules: DistribUtils
  build-depends:   base >= 4.5 && < 4.9
                 , binary >=0.6.3 && < 0.8
                 , template-haskell >= 2.7 && < 2.11
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  if impl(ghc <= 7.6)
      -- prior to ghc-7.4 generics lived in ghc-prim
      build-depends: ghc-prim
  if flag(distributed)
     build-depends:
                   distributed-process == 0.5.*
                 , distributed-process-simplelocalnet ==0.2.*
                 , distributed-static >= 0.2 && < 0.4
  else
     buildable: False
  default-language: Haskell2010

-- extra, not in the text?
executable ping-tc-notify
  main-is: distrib-ping/ping-tc-notify.hs
  other-modules: DistribUtils
  build-depends:   base >= 4.5 && < 4.9
                 , binary >=0.6.3 && < 0.8
                 , template-haskell >= 2.7 && < 2.11
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  if impl(ghc <= 7.6)
      -- prior to ghc-7.4 generics lived in ghc-prim
      build-depends: ghc-prim
  if flag(distributed)
     build-depends:
                   distributed-process == 0.5.*
                 , distributed-process-simplelocalnet ==0.2.*
                 , distributed-static >= 0.2 && < 0.4
  else
     buildable: False
  default-language: Haskell2010

executable ping-fail
  main-is: distrib-ping/ping-fail.hs
  build-depends:   base >= 4.5 && < 4.9
                 , binary >=0.6.3 && < 0.8
                 , template-haskell >= 2.7 && < 2.11
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  if impl(ghc <= 7.6)
      -- prior to ghc-7.4 generics lived in ghc-prim
      build-depends: ghc-prim
  if flag(distributed)
     build-depends:
                   distributed-process == 0.5.*
                 , distributed-process-simplelocalnet ==0.2.*
                 , distributed-static >= 0.2 && < 0.4
  else
     buildable: False
  default-language: Haskell2010

executable distrib-chat
  main-is: distrib-chat/chat.hs
  other-modules: ConcurrentUtils DistribUtils
  build-depends:   base >= 4.5 && < 4.9
                 , containers >= 0.4 && < 0.6
                 , stm ==2.4.*
                 , async ==2.0.*
                 , binary >=0.6.3 && < 0.8
                 , transformers >=0.3 && <0.5
                 , template-haskell >= 2.7 && < 2.11
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  if impl(ghc <= 7.6)
      -- prior to ghc-7.4 generics lived in ghc-prim
      build-depends: ghc-prim
  if flag(distributed)
     build-depends:
                   distributed-process == 0.5.*
                 , distributed-process-simplelocalnet ==0.2.*
                 , distributed-static >= 0.2 && < 0.4
  else
     buildable: False
  default-language: Haskell2010

executable distrib-chat-noslave
  main-is: distrib-chat/chat-noslave.hs
  other-modules: ConcurrentUtils
  build-depends:   base >= 4.5 && < 4.9
                 , containers >= 0.4 && < 0.6
                 , stm ==2.4.*
                 , async ==2.0.*
                 , binary >=0.6.3 && < 0.8
                 , transformers >=0.3 && <0.5
                 , template-haskell >= 2.7 && < 2.11
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  if impl(ghc <= 7.6)
      -- prior to ghc-7.4 generics lived in ghc-prim
      build-depends: ghc-prim
  if flag(distributed)
     build-depends:
                   distributed-process == 0.5.*
                 , distributed-process-simplelocalnet ==0.2.*
                 , distributed-static >= 0.2 && < 0.4
  else
     buildable: False
  default-language: Haskell2010

executable distrib-db
  main-is: db.hs
  hs-source-dirs: . distrib-db
  other-modules: DistribUtils Database
  build-depends:   base >= 4.5 && < 4.9
                 , containers >= 0.4 && < 0.6
                 , stm ==2.4.*
                 , async ==2.0.*
                 , binary >=0.6.3 && < 0.8
                 , template-haskell >= 2.7 && < 2.11
                 , transformers >=0.3 && <0.5
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  if impl(ghc <= 7.6)
      -- prior to ghc-7.4 generics lived in ghc-prim
      build-depends: ghc-prim
  if flag(distributed)
     build-depends:
                   distributed-process == 0.5.*
                 , distributed-process-simplelocalnet ==0.2.*
                 , distributed-static >= 0.2 && < 0.4
  else
     buildable: False
  default-language: Haskell2010

-- -----------------------------------------------------------------------------
-- conc-debugging-tuning

executable  mvar4
  main-is: mvar4.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

executable  deadlock1
  main-is: deadlock1.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

executable  deadlock2
  main-is: deadlock2.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

executable  threadperf1
  main-is: threadperf1.hs
  build-depends:   base >= 4.5 && < 4.9
  default-language: Haskell2010

executable  threadperf2
  main-is: threadperf2.hs
  build-depends:   base >= 4.5 && < 4.9
  ghc-options: -rtsopts
  default-language: Haskell2010

-- -----------------------------------------------------------------------------
-- Extras (exercises etc.)

executable  bingtranslator
  main-is: bingtranslator.hs
  other-modules: BingTranslate GetURL
  hs-source-dirs: other .
  build-depends:   base >= 4.5 && < 4.9
                 , bytestring >= 0.9 && < 0.11
                 , time >= 1.4 && < 1.6
                 , HTTP ==4000.2.*
                 , utf8-string >= 0.3 && < 1.1
                 , xml ==1.3.*
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

executable  bingtranslatorconc
  main-is: bingtranslatorconc.hs
  other-modules: BingTranslate GetURL
  hs-source-dirs: other .
  build-depends:   base >= 4.5 && < 4.9
                 , bytestring >= 0.9 && < 0.11
                 , time >= 1.4 && < 1.6
                 , HTTP ==4000.2.*
                 , utf8-string >= 0.3 && < 1.1
                 , xml ==1.3.*
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

executable  geturlsstm
  main-is: geturlsstm.hs
  other-modules: TimeIt GetURL
  build-depends:   base >= 4.5 && < 4.9
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time >= 1.4 && < 1.6
                 , HTTP ==4000.2.*
  if flag(network26)
      build-depends: network >= 2.6 && < 2.7
                   , network-uri >= 2.6 && < 2.7
  else
      build-depends: network >= 2.3 && < 2.6
  default-language: Haskell2010

-- ToDo:
--   euler35
--   index
--   sudoku-par{1,2,3,4,5}