packages feed

pro-source-0.1.0.0: pro-source.cabal

cabal-version: 3.0

name: pro-source
version: 0.1.0.0

license: MPL-2.0
license-file: LICENSE
author: James Alexander Feldman-Crough
maintainer: hello@typeclasses.com
copyright: © 2019-2020 James Alexander Feldman-Crough

category: Parsing
synopsis: Utilities for tracking source locations
description:
    Forked from part of the
    [prosidy](https://hackage.haskell.org/package/prosidy)
    package.

source-repository head
    type: git
    location: git://github.com/typeclasses/pro-source.git

common base
    default-language: Haskell2010
    ghc-options: -Wall

    default-extensions:
        DeriveAnyClass DeriveGeneric
        DerivingStrategies GeneralizedNewtypeDeriving

        LambdaCase ViewPatterns

        MultiParamTypeClasses TypeFamilies

        OverloadedStrings

        ScopedTypeVariables TypeApplications

    build-depends:
        base ^>= 4.13 || ^>= 4.14 || ^>= 4.15 || ^>= 4.16
      , deepseq ^>= 1.4.4
      , hashable ^>= 1.3 || ^>= 1.4
      , optics-core ^>= 0.3 || ^>= 0.4
      , prettyprinter ^>= 1.6 || ^>= 1.7
      , text ^>= 1.2
      , vector ^>= 0.12

library
    import: base
    hs-source-dirs: src

    exposed-modules:
        ProSource
        ProSource.HasLocation
        ProSource.Location
        ProSource.LocationOps
        ProSource.Line
        ProSource.LineMap
        ProSource.Column
        ProSource.Offset
        ProSource.Source
        ProSource.SourceOps
        ProSource.SparseLocation
        ProSource.Units

    other-modules: Prelude Text

    mixins:
        base          ( Prelude as BasePrelude
                      , Control.Monad
                      , Data.Foldable
                      , Data.List
                      , GHC.Generics
                      )
      , deepseq       ( Control.DeepSeq )
      , hashable      ( Data.Hashable )
      , optics-core   ( Optics.Core )
      , prettyprinter ( Prettyprinter )
      , text          ( Data.Text, Data.Text.Lazy )
      , vector        ( Data.Vector.Generic
                      , Data.Vector.Generic.Mutable
                      , Data.Vector.Unboxed )

test-suite pro-source-test
    import: base
    type: exitcode-stdio-1.0
    hs-source-dirs: test
    main-is: Main.hs

    build-depends:
        pro-source
      , tasty ^>= 1.2 || ^>= 1.3 || ^>= 1.4
      , tasty-hunit ^>= 0.10
      , tasty-quickcheck ^>= 0.10