cabal-version:       2.4
name:                hiedb
version:             0.2.0.0
synopsis:            Generates a references DB from .hie files
description:         Tool and library to index and query a collection of `.hie` files
bug-reports:         https://github.com/wz1000/HieDb/issues
license:             BSD-3-Clause
license-file:        LICENSE
author:              Zubin Duggal
maintainer:          zubin.duggal@gmail.com
copyright:           Zubin Duggal
category:            Development
extra-source-files:  CHANGELOG.md


source-repository head
  type: git
  location: https://github.com/wz1000/HieDb

common common-options
  default-language:    Haskell2010
  build-depends:       base >= 4.12 && < 4.15
  ghc-options:         -Wall
                       -Wincomplete-uni-patterns
                       -Wincomplete-record-updates
                       -Wcompat
                       -Widentities
                       -Wredundant-constraints
                       -Wpartial-fields
                       -Wno-unrecognised-pragmas
executable hiedb
  import:              common-options
  hs-source-dirs:      exe
  main-is:             Main.hs
  build-depends:       base
                     , hiedb
                     , ghc-paths

library
  import:              common-options
  hs-source-dirs:      src
  exposed-modules:     HieDb,
                       HieDb.Utils,
                       HieDb.Create,
                       HieDb.Query,
                       HieDb.Types,
                       HieDb.Dump,
                       HieDb.Html,
                       HieDb.Run
  build-depends:       ghc >= 8.6
                     , array
                     , containers
                     , filepath
                     , directory
                     , mtl
                     , sqlite-simple
                     , hie-compat
                     , text
                     , bytestring
                     , algebraic-graphs
                     , lucid
                     , optparse-applicative
                     , extra
                     , terminal-size

test-suite hiedb-tests
  import:             common-options
  type:               exitcode-stdio-1.0
  hs-source-dirs:     test
  main-is:            Main.hs
  other-modules:      Test.Orphans
  build-tool-depends: hiedb:hiedb
  build-depends:      directory
                    , filepath
                    , ghc >= 8.6
                    , ghc-paths
                    , hiedb
                    , hspec
                    , process