packages feed

ghc-trace-events-0.1.2.7: ghc-trace-events.cabal

cabal-version: 2.2
name: ghc-trace-events
version: 0.1.2.7
synopsis: Faster traceEvent and traceMarker, and binary object logging for
  eventlog
description: ghc-trace-events provides faster traceEvent and traceMarker as well
  as arbitrary binary object logging for the eventlog framework. Unlike the
  <http://hackage.haskell.org/package/base/docs/Debug-Trace.html#g:2 eventlog tracing functions in base>,
  all the tracing functions in this library don't evaluate the input if user
  event logging (the
  <https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/runtime_control.html#rts-flag--l%20⟨flags⟩ -lu>
  flag) is disabled, which can give a significant boost in performance. Take a
  look at the benchmark suite for the details.
  .
  This library provies the following modules:
  .
  ["Debug.Trace.String"] Drop-in replacement for the event tracing functions in
  "Debug.Trace".
  ["Debug.Trace.ByteString"] UTF-8 encoded 'ByteString' variant
  of the event tracing functions in "Debug.Trace". It's faster than the 'String'
  variant.
  ["Debug.Trace.Text"] 'Text' variant of the event tracing functions
  in "Debug.Trace". It's faster than the 'String' variant.
  ["Debug.Trace.Binary"] Arbitary binary object logging available for GHC 8.8 or
  later. Unlike the other tracing functions 'Debug.Trace.Binary.traceBinaryEvent'
  takes an arbitrary 'ByteString' object as opposed to a UTF-8
  encoded string.
homepage: https://github.com/maoe/ghc-trace-events
license: BSD-3-Clause
license-file: LICENSE
author: Mitsutoshi Aoe
maintainer: Mitsutoshi Aoe <me@maoe.name>
copyright: Copyright (C) 2018-2022 Mitsutoshi Aoe
category: Development, GHC, Trace
build-type: Simple
extra-source-files:
  README.md
extra-doc-files:
  CHANGELOG.md
tested-with: GHC == 7.10.3
  || == 8.0.2
  || == 8.2.2
  || == 8.4.4
  || == 8.6.5
  || == 8.8.4
  || == 8.10.7
  || == 9.0.2
  || == 9.2.4
  || == 9.4.1

common base { build-depends: base >= 4.8 && < 4.19 }
common bytestring { build-depends: bytestring >= 0.9.2 && < 0.12 }
common criterion { build-depends: criterion < 1.6 }
common ghc-trace-events { build-depends: ghc-trace-events }
common text { build-depends: text >= 1.0.0 && < 1.3 || >= 2.0 && < 2.1 }
common tasty-bench { build-depends: tasty-bench < 0.4 }

library
  import:
      base
    , bytestring
    , text
  ghc-options: -Wall
  exposed-modules:
    Debug.Trace.ByteString
    Debug.Trace.Flags
    Debug.Trace.String
    Debug.Trace.Text
  if impl(ghc >= 8.7)
    exposed-modules:
      Debug.Trace.Binary
  hs-source-dirs: src
  c-sources: cbits/tracing.c
  default-language: Haskell2010

benchmark bench-trace-enabled
  import:
      base
    , bytestring
    , tasty-bench
    , ghc-trace-events
  type: exitcode-stdio-1.0
  ghc-options: -eventlog -threaded "-with-rtsopts=-l"
  main-is: bench-trace.hs
  hs-source-dirs: benchmarks
  default-language: Haskell2010

benchmark bench-trace-disabled
  import:
      base
    , bytestring
    , tasty-bench
    , ghc-trace-events
  type: exitcode-stdio-1.0
  ghc-options: -threaded
  main-is: bench-trace.hs
  hs-source-dirs: benchmarks
  default-language: Haskell2010

source-repository head
  type: git
  branch: develop
  location: https://github.com/maoe/ghc-trace-events.git