cabal-version:       2.4

name:                semantic-source
version:             0.1.0.2
synopsis:            Types and functionality for working with source code
description:         Types and functionality for working with source code (program text).
homepage:            https://github.com/github/semantic/tree/master/semantic-source#readme
bug-reports:         https://github.com/github/semantic/issues
license:             MIT
license-file:        LICENSE
author:              The Semantic authors
maintainer:          opensource+semantic@github.com
copyright:           (c) 2020 GitHub, Inc.
category:            Data
build-type:          Simple
stability:           alpha
extra-source-files:
  CHANGELOG.md
  README.md

tested-with:
  GHC == 8.6.5
  GHC == 8.8.1
  GHC == 8.10.1
  GHC == 9.2.1

common haskell
  default-language: Haskell2010
  ghc-options:
    -Weverything
    -Wno-missing-local-signatures
    -Wno-missing-import-lists
    -Wno-implicit-prelude
    -Wno-safe
    -Wno-unsafe
    -Wno-name-shadowing
    -Wno-monomorphism-restriction
    -Wno-missed-specialisations
    -Wno-all-missed-specialisations
    -Wno-star-is-type
  if (impl(ghc >= 8.8))
    ghc-options: -Wno-missing-deriving-strategies
  if (impl(ghc >= 8.10))
    ghc-options:
      -Wno-missing-safe-haskell-mode
      -Wno-prepositive-qualified-module
  if (impl(ghc >= 9.2))
    ghc-options:
      -Wno-missing-kind-signatures

library
  import: haskell
  exposed-modules:
    Source.Language
    Source.Loc
    Source.Range
    Source.Source
    Source.Span
  build-depends:
    , aeson           >= 1.4.2.0 && < 3
    , base            >= 4.12 && < 5
    , bytestring      >= 0.10.8.2 && < 0.13
    , deepseq        ^>= 1.4.4.0
    , containers     ^>= 0.6.2
    , hashable        >= 1.2.7 && < 1.4
    , lingo          ^>= 0.5.0.3
    , pathtype       ^>= 0.8.1
    , semilattices   ^>= 0.0.0.3
    , text           ^>= 1.2.3.2
  hs-source-dirs: src

test-suite test
  import: haskell
  type: exitcode-stdio-1.0
  hs-source-dirs: test
  main-is: Test.hs
  other-modules:
    Range.Test
    Source.Test
  build-depends:
    , base
    , hedgehog        ^>= 1
    , semantic-source
    , tasty            >= 1.2 && <2
    , tasty-hedgehog  ^>= 1.0.0.1
    , tasty-hunit      >= 0.10 && <1
    , text

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