cabal-version: 2.4

name:                   hedgehog-extras
version:                0.9.0.0
synopsis:               Supplemental library for hedgehog
description:            Supplemental library for hedgehog.
category:               Test
author:                 IOHK
maintainer:             operations@iohk.io
license:                Apache-2.0
license-files:          LICENSE
                        NOTICE
build-type:             Simple

source-repository head
  type:                 git
  location:             https://github.com/input-output-hk/hedgehog-extras

common aeson                        { build-depends: aeson                            >= 2.0.0.0                  }
common aeson-pretty                 { build-depends: aeson-pretty                     >= 0.8.5                    }
common async                        { build-depends: async                                                        }
common base                         { build-depends: base                             >= 4.12       && < 4.22     }
common bytestring                   { build-depends: bytestring                                                   }
common containers                   { build-depends: containers                                                   }
common deepseq                      { build-depends: deepseq                                                      }
common Diff                         { build-depends: Diff                                                         }
common directory                    { build-depends: directory                                                    }
common exceptions                   { build-depends: exceptions                                                   }
common filepath                     { build-depends: filepath                                                     }
common generic-lens                 { build-depends: generic-lens                                                 }
common hedgehog                     { build-depends: hedgehog                                                     }
common hedgehog-quickcheck          { build-depends: hedgehog-quickcheck                                          }
common http-conduit                 { build-depends: http-conduit                                                 }
common hw-prelude                   { build-depends: hw-prelude                                                   }
common lifted-async                 { build-depends: lifted-async                                                 }
common lifted-base                  { build-depends: lifted-base                                                  }
common microlens                    { build-depends: microlens                                                    }
common mmorph                       { build-depends: mmorph                                                       }
common monad-control                { build-depends: monad-control                                                }
common mtl                          { build-depends: mtl                                                          }
common network                      { build-depends: network                                                      }
common process                      { build-depends: process                                                      }
common resourcet                    { build-depends: resourcet                                                    }
common retry                        { build-depends: retry                             >= 0.9                     }
common stm                          { build-depends: stm                                                          }
common tar                          { build-depends: tar                              ^>= 0.6                     }
common tasty                        { build-depends: tasty                                                        }
common tasty-discover               { build-depends: tasty-discover                   >= 5.0.2                    }
common tasty-hedgehog               { build-depends: tasty-hedgehog                                               }
common tasty-quickcheck             { build-depends: tasty-quickcheck                                             }
common temporary                    { build-depends: temporary                                                    }
common text                         { build-depends: text                                                         }
common time                         { build-depends: time                             >= 1.9.1                    }
common transformers                 { build-depends: transformers                                                 }
common transformers-base            { build-depends: transformers-base                                            }
common unliftio                     { build-depends: unliftio                                                     }
common yaml                         { build-depends: yaml                                                         }
common zlib                         { build-depends: zlib                                                         }

common hedgehog-extras              { build-depends: hedgehog-extras                                              }

common Win32
  if os(windows)
    build-depends:      Win32   >= 2.5.4.1

common project-config
  default-language:     Haskell2010
  default-extensions:   NoImplicitPrelude
  ghc-options:          -Wall
                        -Wcompat
                        -Wincomplete-record-updates
                        -Wincomplete-uni-patterns
                        -Wpartial-fields
                        -Wredundant-constraints
                        -Wunused-packages

library
  import:               base, project-config,
                        aeson-pretty,
                        aeson,
                        async,
                        bytestring,
                        containers,
                        deepseq,
                        Diff,
                        directory,
                        exceptions,
                        filepath,
                        generic-lens,
                        hedgehog,
                        http-conduit,
                        hw-prelude,
                        lifted-async,
                        lifted-base,
                        microlens,
                        mmorph,
                        monad-control,
                        mtl,
                        network,
                        process,
                        resourcet,
                        stm,
                        tar,
                        tasty,
                        tasty-discover,
                        tasty-hedgehog,
                        temporary,
                        text,
                        time,
                        transformers,
                        transformers-base,
                        unliftio,
                        Win32,
                        yaml,
                        zlib,
  hs-source-dirs:       src


  if os(windows)
    exposed-modules:    Hedgehog.Extras.Internal.Win32.NamedPipes
  exposed-modules:      Hedgehog.Extras
                        Hedgehog.Extras.Aeson
                        Hedgehog.Extras.Internal.Cli
                        Hedgehog.Extras.Internal.Orphans
                        Hedgehog.Extras.Internal.Plan
                        Hedgehog.Extras.Internal.Test.Integration
                        Hedgehog.Extras.Stock
                        Hedgehog.Extras.Stock.Aeson
                        Hedgehog.Extras.Stock.CallStack
                        Hedgehog.Extras.Stock.IO.File
                        Hedgehog.Extras.Stock.IO.Network.NamedPipe
                        Hedgehog.Extras.Stock.IO.Network.Port
                        Hedgehog.Extras.Stock.IO.Network.Socket
                        Hedgehog.Extras.Stock.IO.Network.Sprocket
                        Hedgehog.Extras.Stock.IO.Process
                        Hedgehog.Extras.Stock.Monad
                        Hedgehog.Extras.Stock.OS
                        Hedgehog.Extras.Stock.String
                        Hedgehog.Extras.Stock.Time
                        Hedgehog.Extras.Test
                        Hedgehog.Extras.Test.Base
                        Hedgehog.Extras.Test.Concurrent
                        Hedgehog.Extras.Test.File
                        Hedgehog.Extras.Test.Golden
                        Hedgehog.Extras.Test.MonadAssertion
                        Hedgehog.Extras.Test.Network
                        Hedgehog.Extras.Test.Prim
                        Hedgehog.Extras.Test.Process
                        Hedgehog.Extras.Test.TestWatchdog
                        Hedgehog.Extras.Test.Tripwire
                        Hedgehog.Extras.Test.Unit

test-suite hedgehog-extras-test
  import:               base, project-config,
                        hedgehog,
                        hedgehog-extras,
                        lifted-base,
                        network,
                        process,
                        resourcet,
                        tasty,
                        tasty-discover,
                        tasty-hedgehog,
                        transformers,
                        time,
  hs-source-dirs:       test
  main-is:              hedgehog-extras-test.hs
  type:                 exitcode-stdio-1.0

  other-modules:        Hedgehog.Extras.Stock.IO.Network.PortSpec
                        Hedgehog.Extras.Test.TestExpectFailure
                        Hedgehog.Extras.Test.TestWatchdogSpec
                        Hedgehog.Extras.Test.UnitSpec

  build-tool-depends:   tasty-discover:tasty-discover
  ghc-options:          -threaded -rtsopts "-with-rtsopts=-N -T"