packages feed

lightstep-haskell-0.10.0: lightstep-haskell.cabal

cabal-version: 2.4

name:           lightstep-haskell
version:        0.10.0
synopsis:       LightStep OpenTracing client library
description:    LightStep OpenTracing client library. Uses GRPC transport via proto-lens.
category:       Tools
homepage:       https://github.com/ethercrow/lightstep-haskell#readme
bug-reports:    https://github.com/ethercrow/lightstep-haskell/issues
maintainer:     Dmitry Ivanov <ethercrow@gmail.com>
license:        Apache-2.0
license-file:   LICENSE
build-type:     Simple

source-repository head
  type: git
  location: https://github.com/ethercrow/lightstep-haskell

common options
  default-extensions:
    BangPatterns
    BlockArguments
    DataKinds
    FlexibleInstances
    LambdaCase
    MultiParamTypeClasses
    MultiWayIf
    NamedFieldPuns
    NumericUnderscores
    RecordWildCards
    ScopedTypeVariables
    TupleSections
    TypeApplications
    ViewPatterns
  ghc-options:
    -Wall
    -Wcompat
    -Widentities
    -Wincomplete-record-updates
    -Wincomplete-uni-patterns
    -Wpartial-fields
    -Wredundant-constraints
    -fhide-source-paths
    -ferror-spans
    -freverse-errors
  default-language: Haskell2010

library
  import: options
  exposed-modules:
      LightStep.Config
      LightStep.HighLevel.IO
      LightStep.Internal.Debug
      LightStep.LowLevel
      LightStep.Diagnostics
      LightStep.Propagation
      Network.Wai.Middleware.LightStep
  other-modules:
      Paths_lightstep_haskell
      Proto.Collector
      Proto.Collector_Fields
      Proto.Google.Api.Annotations
      Proto.Google.Api.Http
      Proto.Google.Protobuf.Timestamp
      Proto.Google.Protobuf.Timestamp_Fields
  autogen-modules:
      Paths_lightstep_haskell
  hs-source-dirs:
      src
      gen
  build-depends:
      base >=4.12 && <5
    , async
    , bytestring
    , chronos
    , containers
    , hashable
    , http-types
    , http2-client >= 0.9.0.0
    , http2-client-grpc >= 0.8.0.0
    , http2-grpc-proto-lens >= 0.1.0.0
    , lens
    , mtl
    , proto-lens >= 0.5.1.0
    , proto-lens-protobuf-types >= 0.5.0.0
    , proto-lens-runtime >= 0.5.0.0
    , random
    , exceptions
    , stm
    , text
    , text-show
    , transformers
    , unordered-containers
    , wai

flag examples
  description: Build example executables
  default: False

common example
  if flag(examples)
    buildable: True
  else
    buildable: False

executable lightstep-haskell-example
  import: options, example
  ghc-options:
    -threaded
    -rtsopts
    -with-rtsopts=-N
  main-is: Main.hs
  hs-source-dirs:
      examples/readme
  build-depends:
      base >=4.9 && <5
    , async
    , http2-client
    , lightstep-haskell
    , text

executable lightstep-haskell-wai-example
  import: options, example
  ghc-options:
    -threaded
    -rtsopts
    "-with-rtsopts=-N -T -s"
  main-is: Main.hs
  hs-source-dirs:
      examples/wai
  build-depends:
      base >=4.9 && <5
    , lightstep-haskell
    , http-types
    , text
    , wai
    , warp
    , bytestring

executable lightstep-haskell-req-example
  import: options, example
  ghc-options:
    -threaded
    -rtsopts
    -with-rtsopts=-N
  main-is: Main.hs
  hs-source-dirs:
      examples/req
  build-depends:
      base >=4.9 && <5
    , lightstep-haskell
    , case-insensitive
    , http-types
    , text
    , req >= 3.0.0
    , unordered-containers

executable lightstep-haskell-stress-test
  import: options
  ghc-options:
    -threaded
    -rtsopts
    "-with-rtsopts=-N -T"
  main-is: Main.hs
  hs-source-dirs:
      stress-test
  build-depends:
      base >=4.9 && <5
    , lightstep-haskell
    , text
    , async

test-suite unit
  import: options
  type:       exitcode-stdio-1.0
  main-is:    Main.hs
  other-modules:
    TestPropagation
  hs-source-dirs:
    unit-test
  build-depends:
    base,
    deepseq,
    lens,
    tasty,
    tasty-quickcheck,
    tasty-hunit,
    tasty-discover,
    lightstep-haskell,
    proto-lens >= 0.5.1.0,
    proto-lens-protobuf-types >= 0.5.0.0,
    proto-lens-runtime >= 0.5.0.0