cabal-version:       2.4
build-type:          Simple
name:                lingo
version:             0.5.0.1
synopsis:            File extension based programming language detection
description:         Lingo uses github/linguist's language registry to enable fast detection of a file path's programming langauge based on extension or filename.
homepage:            https://github.com/tclem/lingo-haskell
license:             BSD-3-Clause
license-file:        LICENSE
author:              Timothy Clem
maintainer:          timothy.clem@gmail.com
category:            Data
extra-source-files:  README.md
                   , languages.yml
                   , ChangeLog.md

tested-with:         GHC == 8.8.3
                     GHC == 8.10.1
                     GHC == 9.2.1

common haskell
  default-language: Haskell2010
  default-extensions: OverloadedStrings

library
  import: haskell
  exposed-modules: Data.Languages
  other-modules: Gen_Languages
  autogen-modules: Gen_Languages
  build-depends:       base >= 4.12 && < 5
                     , bytestring >= 0.10.8.2 && < 0.12
                     , containers ^>= 0.6.0.1
                     , filepath ^>= 1.4.2.1
                     , raw-strings-qq ^>= 1.1
                     , text ^>= 1.2.3.1
                     , yaml ^>= 0.11.1.2
  hs-source-dirs:      src

executable generate
  import: haskell
  hs-source-dirs: app
  main-is: Generate.hs
  build-depends: base >= 4.12 && < 5
               , bytestring >= 0.10.8.2 && < 0.12
               , containers ^>= 0.6.0.1
               , directory
               , filepath ^>= 1.4.2.1
               , raw-strings-qq ^>= 1.1
               , text ^>= 1.2.3.1
               , yaml ^>= 0.11.1.2

test-suite test
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Spec.hs
  build-depends:       base
                     , lingo
                     , hspec ^>= 2.7.1
  default-language:    Haskell2010
  default-extensions:  OverloadedStrings

source-repository head
  type:     git
  location: https://github.com/tclem/lingo-haskell