packages feed

ghc-debug-stub-0.1.0.0: ghc-debug-stub.cabal

cabal-version:       2.4
name:                ghc-debug-stub
version:             0.1.0.0
synopsis:            Functions for instrumenting your application so the heap
                     can be analysed with ghc-debug-common.
description:         Functions for instrumenting your application so the heap can
                     be analysed with ghc-debug-common.
homepage:            https://gitlab.haskell.org/ghc/ghc-debug
license:             BSD-3-Clause
license-file:        LICENSE
author:              Ben Gamari, Matthew Pickering
maintainer:          matthewtpickering@gmail.com
copyright:           (c) 2019-2021 Ben Gamari, Matthew Pickering
category:            Development
build-type:          Simple
extra-source-files:  CHANGELOG.md, cbits/socket.h, cbits/trace.h, cbits/parser.h

flag trace
  Description: Enable tracing
  Default:     False
  Manual:      True

flag testexes
  Description:   Build test executables
  Default:       False

library
  exposed-modules:     GHC.Debug.Stub
  hs-source-dirs:      src
  build-depends:       base >=4.12 && <4.14
                     , directory ^>= 1.3
                     , filepath ^>= 1.4
                     , ghc-prim ^>= 0.8
                     , ghc-debug-convention ^>= 0.1
  default-language:    Haskell2010
  cxx-sources:         cbits/stub.cpp, cbits/socket.cpp, cbits/trace.cpp
  cxx-options:         -std=gnu++11 -O3 -g3 -DTHREADED_RTS
  extra-libraries:     stdc++
  cpp-options: -DTHREADED_RTS
  if flag(trace)
    cpp-options: -DTRACE

executable debug-test
  if flag(testexes)
    buildable: True
  else
    buildable: False
  main-is:             Test.hs
  ghc-options:         -threaded  -g3 -O0 -finfo-table-map -fdistinct-constructor-tables
  build-depends:       base,
                       ghc-debug-stub, containers, unordered-containers
  default-language:    Haskell2010

executable large-thunk
  if flag(testexes)
    buildable: True
  else
    buildable: False
  main-is:             LargeThunk.hs
  ghc-options:         -threaded -g3 -O2 -finfo-table-map -fdistinct-constructor-tables -rtsopts
  build-depends:       base,
                       ghc-debug-stub, containers, deepseq
  default-language:    Haskell2010