packages feed

parconc-examples-0.2: parconc-examples.cabal

name:                parconc-examples
version:             0.2
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

-- -----------------------------------------------------------------------------
-- 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

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

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

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

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

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

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

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

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

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

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

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

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

executable rsa2
  main-is: rsa2.hs
  other-modules: ByteStringCompat
  build-depends:   base >= 4.5 && < 4.7
                 , bytestring >= 0.9 && < 0.11
                 , parallel ==3.2.*
                 , deepseq ==1.3.*
  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.7
                 , parallel ==3.2.*
                 , time ==1.4.*
                 , deepseq ==1.3.*
                 , 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.7
                 , array ==0.4.*
                 , bytestring >= 0.9 && < 0.11
                 , vector >= 0.10 && < 0.11
  ghc-options: -threaded
  default-language: Haskell2010

executable GenSamples
  hs-source-dirs: kmeans
  main-is: GenSamples.hs
  build-depends:   base >= 4.5 && < 4.7
                 , binary >=0.6.3 && < 0.7
                 , array ==0.4.*
                 , vector >= 0.10 && < 0.11
                 , random >= 1.0 && < 1.1
                 , normaldistribution >= 1.1 && < 1.2
                 , deepseq ==1.3.*
                 , bytestring >= 0.9 && < 0.11
  default-language: Haskell2010

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

executable parmonad
  main-is: parmonad.hs
  build-depends:   base >= 4.5 && < 4.7
                 , 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.7
                 , bytestring >= 0.9 && < 0.11
                 , monad-par >= 0.3.4 && < 0.4
                 , deepseq ==1.3.*
  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.7
                 , random >= 1.0 && < 1.1
                 , array ==0.4.*
                 , 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.7
                 , random >= 1.0 && < 1.1
                 , array ==0.4.*
                 , containers >= 0.4 && < 0.6
                 , monad-par >= 0.3.4 && < 0.4
                 , deepseq ==1.3.*
  ghc-options: -threaded
  default-language: Haskell2010

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

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

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

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

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

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

executable  fwdense1
  main-is: fwdense1.hs
  build-depends:   base >= 4.5 && < 4.7
                 , repa == 3.2.*
                 , transformers ==0.3.*
  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.7
                 , repa == 3.2.*
  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
  build-depends:   base >= 4.5 && < 4.7
                 , accelerate >= 0.12
  ghc-options: -O2
  default-language: Haskell2010

executable  fwaccel-gpu
  main-is: fwaccel.hs
  build-depends:   base >= 4.5 && < 4.7
                 , accelerate >= 0.12
  if flag(cuda)
     build-depends: accelerate-cuda >= 0.12
  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.7
                 , accelerate >= 0.12
                 , fclabels
                 , accelerate-io
  if flag(cuda)
     build-depends: accelerate-cuda >= 0.12
  else
     buildable: False
  ghc-options: -O2
  default-language: Haskell2010

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

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

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

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

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

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

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

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

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

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

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

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

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

executable geturls1
  main-is: geturls1.hs
  other-modules: GetURL
  build-depends:   base >= 4.5 && < 4.7
                 , containers >= 0.4 && < 0.6
                 , network >= 2.3 && < 2.5
                 , HTTP ==4000.2.*
                 , bytestring >= 0.9 && < 0.11
  default-language: Haskell2010

executable  geturls2
  main-is: geturls2.hs
  other-modules: GetURL
  build-depends:   base >= 4.5 && < 4.7
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time ==1.4.*
                 , network >= 2.3 && < 2.5
                 , HTTP ==4000.2.*
  default-language: Haskell2010

executable  geturls3
  main-is: geturls3.hs
  other-modules: TimeIt GetURL
  build-depends:   base >= 4.5 && < 4.7
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time ==1.4.*
                 , network >= 2.3 && < 2.5
                 , HTTP ==4000.2.*
  default-language: Haskell2010

executable  geturls4
  main-is: geturls4.hs
  other-modules: GetURL
  build-depends:   base >= 4.5 && < 4.7
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time ==1.4.*
                 , network >= 2.3 && < 2.5
                 , HTTP ==4000.2.*
  default-language: Haskell2010

executable  geturls5
  main-is: geturls5.hs
  other-modules: GetURL
  build-depends:   base >= 4.5 && < 4.7
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time ==1.4.*
                 , network >= 2.3 && < 2.5
                 , HTTP ==4000.2.*
  default-language: Haskell2010

executable  geturls6
  main-is: geturls6.hs
  other-modules: TimeIt GetURL
  build-depends:   base >= 4.5 && < 4.7
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time ==1.4.*
                 , network >= 2.3 && < 2.5
                 , HTTP ==4000.2.*
  default-language: Haskell2010

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

executable  geturlscancel
  main-is: geturlscancel.hs
  other-modules: TimeIt GetURL
  build-depends:   base >= 4.5 && < 4.7
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time ==1.4.*
                 , network >= 2.3 && < 2.5
                 , HTTP ==4000.2.*
  default-language: Haskell2010

executable  geturlscancel2
  main-is: geturlscancel2.hs
  other-modules: TimeIt GetURL
  build-depends:   base >= 4.5 && < 4.7
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time ==1.4.*
                 , network >= 2.3 && < 2.5
                 , HTTP ==4000.2.*
  default-language: Haskell2010

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

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

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

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

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

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

-- not mentioned in the text?
executable  windowman
  main-is: windowman.hs
  build-depends:   base >= 4.5 && < 4.7
                 , containers >= 0.4 && < 0.6
                 , stm ==2.4.*
  default-language: Haskell2010

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

executable  geturlsfirst
  main-is: geturlsfirst.hs
  other-modules: ConcurrentUtils
  build-depends:   base >= 4.5 && < 4.7
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time ==1.4.*
                 , HTTP ==4000.2.*
                 , network >= 2.3 && < 2.5
  default-language: Haskell2010

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

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

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

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

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

executable  geturls7
  main-is: geturls7.hs
  other-modules: ConcurrentUtils
  build-depends:   base >= 4.5 && < 4.7
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time ==1.4.*
                 , network >= 2.3 && < 2.5
                 , HTTP ==4000.2.*
  default-language: Haskell2010

executable  geturls8
  main-is: geturls8.hs
  build-depends:   base >= 4.5 && < 4.7
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time ==1.4.*
                 , network >= 2.3 && < 2.5
                 , HTTP ==4000.2.*
  default-language: Haskell2010

executable  geturls9
  main-is: geturls9.hs
  build-depends:   base >= 4.5 && < 4.7
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time ==1.4.*
                 , network >= 2.3 && < 2.5
                 , HTTP ==4000.2.*
  default-language: Haskell2010

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

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

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

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

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

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

executable findpar4
  main-is: findpar4.hs
  build-depends:   base >= 4.5 && < 4.7
                 , filepath ==1.3.*
                 , directory >= 1.1 && < 1.3
                 , async ==2.0.*
                 , stm ==2.4.*
                 , transformers ==0.3.*
                 , 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.7
                 , stm ==2.4.*
                 , network >= 2.3 && < 2.5
  default-language: Haskell2010

executable  server2
  main-is: server2.hs
  other-modules: ConcurrentUtils
  build-depends:   base >= 4.5 && < 4.7
                 , stm ==2.4.*
                 , async ==2.0.*
                 , network >= 2.3 && < 2.5
  default-language: Haskell2010

executable chat
  main-is: chat.hs
  other-modules: ConcurrentUtils
  build-depends:   base >= 4.5 && < 4.7
                 , containers >= 0.4 && < 0.6
                 , async ==2.0.*
                 , stm ==2.4.*
                 , network >= 2.3 && < 2.5
  default-language: Haskell2010

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

executable ping
  main-is: distrib-ping/ping.hs
  other-modules: DistribUtils
  build-depends:   base >= 4.5 && < 4.7
                 , network >= 2.3 && < 2.5
                 , binary >=0.6.3 && < 0.7
                 , distributed-process >= 0.4.2 && < 0.5
                 , distributed-process-simplelocalnet ==0.2.*
                 , distributed-static ==0.2.*
                 , template-haskell >= 2.7 && < 2.9
  if impl(ghc <= 7.6)
      -- prior to ghc-7.4 generics lived in ghc-prim
      build-depends: ghc-prim
  default-language: Haskell2010

executable ping-multi
  main-is: distrib-ping/ping-multi.hs
  other-modules: DistribUtils
  build-depends:   base >= 4.5 && < 4.7
                 , network >= 2.3 && < 2.5
                 , binary >=0.6.3 && < 0.7
                 , distributed-process >= 0.4.2 && < 0.5
                 , distributed-process-simplelocalnet ==0.2.*
                 , distributed-static ==0.2.*
                 , template-haskell >= 2.7 && < 2.9
  if impl(ghc <= 7.6)
      -- prior to ghc-7.4 generics lived in ghc-prim
      build-depends: ghc-prim
  default-language: Haskell2010

executable ping-tc
  main-is: distrib-ping/ping-tc.hs
  other-modules: DistribUtils
  build-depends:   base >= 4.5 && < 4.7
                 , network >= 2.3 && < 2.5
                 , binary >=0.6.3 && < 0.7
                 , distributed-process >= 0.4.2 && < 0.5
                 , distributed-process-simplelocalnet ==0.2.*
                 , distributed-static ==0.2.*
                 , template-haskell >= 2.7 && < 2.9
  if impl(ghc <= 7.6)
      -- prior to ghc-7.4 generics lived in ghc-prim
      build-depends: ghc-prim
  default-language: Haskell2010

executable ping-tc-merge
  main-is: distrib-ping/ping-tc-merge.hs
  other-modules: DistribUtils
  build-depends:   base >= 4.5 && < 4.7
                 , network >= 2.3 && < 2.5
                 , binary >=0.6.3 && < 0.7
                 , distributed-process >= 0.4.2 && < 0.5
                 , distributed-process-simplelocalnet ==0.2.*
                 , distributed-static ==0.2.*
                 , template-haskell >= 2.7 && < 2.9
  if impl(ghc <= 7.6)
      -- prior to ghc-7.4 generics lived in ghc-prim
      build-depends: ghc-prim
  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.7
                 , network >= 2.3 && < 2.5
                 , binary >=0.6.3 && < 0.7
                 , distributed-process >= 0.4.2 && < 0.5
                 , distributed-process-simplelocalnet ==0.2.*
                 , distributed-static ==0.2.*
                 , template-haskell >= 2.7 && < 2.9
  if impl(ghc <= 7.6)
      -- prior to ghc-7.4 generics lived in ghc-prim
      build-depends: ghc-prim
  default-language: Haskell2010

executable ping-fail
  main-is: distrib-ping/ping-fail.hs
  build-depends:   base >= 4.5 && < 4.7
                 , network >= 2.3 && < 2.5
                 , binary >=0.6.3 && < 0.7
                 , distributed-process >= 0.4.2 && < 0.5
                 , distributed-process-simplelocalnet ==0.2.*
                 , distributed-static ==0.2.*
                 , template-haskell >= 2.7 && < 2.9
  if impl(ghc <= 7.6)
      -- prior to ghc-7.4 generics lived in ghc-prim
      build-depends: ghc-prim
  default-language: Haskell2010

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

executable distrib-chat-noslave
  main-is: distrib-chat/chat-noslave.hs
  other-modules: ConcurrentUtils
  build-depends:   base >= 4.5 && < 4.7
                 , containers >= 0.4 && < 0.6
                 , stm ==2.4.*
                 , async ==2.0.*
                 , network >= 2.3 && < 2.5
                 , binary >=0.6.3 && < 0.7
                 , distributed-process >= 0.4.2 && < 0.5
                 , distributed-process-simplelocalnet ==0.2.*
                 , distributed-static ==0.2.*
                 , transformers ==0.3.*
                 , template-haskell >= 2.7 && < 2.9
  if impl(ghc <= 7.6)
      -- prior to ghc-7.4 generics lived in ghc-prim
      build-depends: ghc-prim
  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.7
                 , containers >= 0.4 && < 0.6
                 , stm ==2.4.*
                 , async ==2.0.*
                 , network >= 2.3 && < 2.5
                 , binary >=0.6.3 && < 0.7
                 , distributed-process >= 0.4.2 && < 0.5
                 , distributed-process-simplelocalnet ==0.2.*
                 , distributed-static ==0.2.*
                 , transformers ==0.3.*
                 , template-haskell >= 2.7 && < 2.9
  if impl(ghc <= 7.6)
      -- prior to ghc-7.4 generics lived in ghc-prim
      build-depends: ghc-prim
  default-language: Haskell2010

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

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

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

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

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

executable  threadperf2
  main-is: threadperf2.hs
  build-depends:   base >= 4.5 && < 4.7
  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.7
                 , bytestring >= 0.9 && < 0.11
                 , time ==1.4.*
                 , HTTP ==4000.2.*
                 , network >= 2.3 && < 2.5
                 , utf8-string ==0.3.*
                 , xml ==1.3.*
  default-language: Haskell2010

executable  bingtranslatorconc
  main-is: bingtranslatorconc.hs
  other-modules: BingTranslate GetURL
  hs-source-dirs: other .
  build-depends:   base >= 4.5 && < 4.7
                 , bytestring >= 0.9 && < 0.11
                 , time ==1.4.*
                 , HTTP ==4000.2.*
                 , network >= 2.3 && < 2.5
                 , utf8-string ==0.3.*
                 , xml ==1.3.*
  default-language: Haskell2010

executable  geturlsstm
  main-is: geturlsstm.hs
  other-modules: TimeIt GetURL
  build-depends:   base >= 4.5 && < 4.7
                 , stm ==2.4.*
                 , bytestring >= 0.9 && < 0.11
                 , time ==1.4.*
                 , network >= 2.3 && < 2.5
                 , HTTP ==4000.2.*
  default-language: Haskell2010

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

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