cabal-version:      3.0
name:               hs-mem-info
version:            0.1.0.0
synopsis:           Print the core memory usage of programs
description:
  A utility to accurately report the core memory usage of programs.

  This is a clone of
  [ps_mem](https://github.com/pixelb/ps_mem/blob/master/README.md), which is
  written in python

  The package provides:

    * an executable command `printmem` that mimics `ps_mem`

    * a library to enable core memory tracking on linux in haskell programs

license:            BSD-3-Clause
license-file:       LICENSE
author:             Tim Emiola
maintainer:         adetokunbo@emio.la
category:           Command Line Tools, system
homepage:           https://github.com/adetokunbo/hs-mem-info#readme
bug-reports:        https://github.com/adetokunbo/hs-mem-info/issues
build-type:         Simple
extra-source-files: ChangeLog.md

source-repository head
  type:     git
  location: https://github.com/adetokunbo/hs-mem-info.git

library
  exposed-modules:
    System.MemInfo
    System.MemInfo.Choices
    System.MemInfo.Prelude
    System.MemInfo.Print
    System.MemInfo.Proc
    System.MemInfo.SysInfo

  hs-source-dirs:   src
  build-depends:
    , base                  >=4.14   && <5
    , bytestring            >=0.11.4 && <0.12
    , containers            >=0.6.5  && <0.8
    , directory             >=1.3.6  && <1.5
    , filepath              >=1.4.2  && <1.6
    , fmt                   >=0.6.3  && <0.8
    , hashable              >=1.4.2  && <1.6
    , optparse-applicative  >=0.18.1 && <0.19
    , text                  >=1.2.5  && <1.3
    , unix                  >=2.7.2  && <2.9
    , validity              >=0.12.0 && <0.14
    , validity-text         >=0.3.1  && <0.4.1

  default-language: Haskell2010
  ghc-options:
    -Wall -Wincomplete-uni-patterns -Wpartial-fields -fwarn-tabs

test-suite test
  type:             exitcode-stdio-1.0
  main-is:          Spec.hs
  hs-source-dirs:   test
  other-modules:
    MemInfo.OrphanInstances
    MemInfo.PrintSpec
    MemInfo.ProcSpec
    MemInfo.SysInfoSpec

  default-language: Haskell2010
  ghc-options:      -threaded -rtsopts -with-rtsopts=-N -Wall -fwarn-tabs
  build-depends:
    , base
    , fmt
    , genvalidity
    , genvalidity-hspec
    , genvalidity-text
    , hs-mem-info
    , hspec              >=2.1 && <2.11
    , QuickCheck
    , text

-- printmem is the printmem command
executable printmem
  main-is:          PrintMem.hs
  hs-source-dirs:   exe
  default-language: Haskell2010
  build-depends:
    , base         >=4.14 && <5
    , hs-mem-info

  ghc-options:      -threaded -rtsopts -with-rtsopts=-N
  ghc-options:
    -Wall -Wincomplete-uni-patterns -Wpartial-fields -fwarn-tabs