cabal-version:       3.0

-- Initial package description 'hum.cabal' generated by 'cabal init'.  For
-- further documentation, see http://haskell.org/cabal/users-guide/

-- The name of the package.
name:                hum

-- The package version.  See the Haskell package versioning policy (PVP)
-- for standards guiding when and how versions should be incremented.
-- https://pvp.haskell.org
-- PVP summary:      +-+------- breaking API changes
--                   | | +----- non-breaking API additions
--                   | | | +--- code changes with no API change
version:             0.1.0.0

-- A short (one-line) description of the package.
synopsis:            A TUI MPD client, inspired by ncmpcpp

-- A longer description of the package.
description:         A TUI MPD client, inspired by ncmpcpp.
                     Built using brick and libmpd.

-- A URL where users can report bugs.
-- bug-reports:

-- The license under which the package is released.
license:             GPL-2.0-or-later

-- The file containing the license text.
license-file:        LICENSE

-- The package author(s).
author:              Itai Y. Efrat

-- An email address to which users can send suggestions, bug reports, and
-- patches.
maintainer:          itai3397@gmail.com

-- A copyright notice.
copyright: (c) Itai Efrat 2020

category: Sound

tested-with: GHC == 8.10.2, GHC == 8.8.4, GHC == 8.6.5, GHC == 8.4.4
-- Extra files to be distributed with the package, such as examples or a
-- README.
extra-source-files:
  CHANGELOG.md
  README.md

source-repository head
  type: git
  location: https://gitlab.com/iyefrat/hum.git

common deps
  build-depends:
      base                 >= 4.11 && < 4.15
     ,brick                >= 0.57.1 && < 0.58
     ,bytestring           >= 0.10.10 && < 0.11
     ,containers           >= 0.6.2 && < 0.7
     ,text                 >= 1.2.3 && < 1.3
     ,mtl                  >= 2.2.2 && < 2.3
     ,transformers         >= 0.5.6.2 && < 0.6
     ,template-haskell     >= 2.13.0 && < 2.17
     ,filepath             >= 1.4.2 && < 1.5
     ,directory            >= 1.3.6.1 && < 1.4
     ,time                 >= 1.9.3 && < 1.10
     ,lens                 >= 4.19.2 && < 4.20
     ,text-zipper          >= 0.10.1 && < 0.11
     ,vector               >= 0.12.1 && < 0.13
     ,vty                  >= 5.32 && < 5.33
     ,libmpd               >= 0.9.2 && < 0.10
     ,relude               >= 0.7.0 && < 0.8
     ,witherable-class

  mixins:
      base hiding (Prelude)
    , relude (Relude as Prelude)

  ghc-options:
    -Wall
    -Wcompat
    -Wincomplete-record-updates
    -Wincomplete-uni-patterns
    -Wredundant-constraints

  default-extensions:
    LambdaCase
    FlexibleInstances
    FlexibleContexts
    InstanceSigs
    MultiParamTypeClasses
    EmptyCase
    OverloadedStrings
    NamedFieldPuns
    MultiWayIf
    TupleSections
    DeriveFoldable
    DeriveFunctor
    DeriveTraversable
    DeriveGeneric
    GeneralizedNewtypeDeriving
    DerivingStrategies
    BangPatterns
    KindSignatures
    TypeOperators
    ScopedTypeVariables
    TemplateHaskell
    RankNTypes
  default-language:    Haskell2010

library
  import: deps
  -- Modules exported by the library.
  exposed-modules:
               Hum.UI
             , Hum.Types
             , Hum.BChan
             , Hum.Attributes
             , Hum.Views
             , Hum.Views.Common
             , Hum.Views.Queue
             , Hum.Views.Library
             , Hum.Views.Playlists
             , Hum.Views.Help
             , Hum.Utils
             , Hum.Modes
             , Hum.Modes.ExMode
             , Hum.Modes.PromptMode
             , Hum.Rebuild
  -- Modules included in this library but not exported.
  other-modules: Brick.Widgets.List

  -- Other library packages from which modules are imported.
 -- Directories containing source files.
  hs-source-dirs:      src


executable hum
  import: deps
  -- .hs or .lhs file containing the Main module.
  main-is:             Main.hs

  -- Modules included in this executable, other than Main.
  -- other-modules:
  build-depends:       hum
  -- Directories containing source files.
  hs-source-dirs:      app
  ghc-options:         -threaded

test-suite hum-test
  import: deps
  -- Base language which the package is written in.
  default-language:    Haskell2010

  -- The interface type and version of the test suite.
  type:                exitcode-stdio-1.0

  -- The directory where the test specifications are found.
  hs-source-dirs:      test

  -- The entrypoint to the test suite.
  main-is:             MyLibTest.hs