packages feed

loc-0.1.4.0: loc.cabal

cabal-version: 3.0

name: loc
version: 0.1.4.0

synopsis: Types representing line and column positions and ranges in text files.

description:
    The package name /loc/ stands for “location” and is
    also an allusion to the acronym for “lines of code”.

    The @Loc@ type represents a caret position in a text file,
    the @Span@ type is a nonempty range between two @Loc@s,
    and the @Area@ type is a set of non-touching @Span@s.

category: Data Structures, Text

homepage: https://github.com/typeclasses/loc

author: Chris Martin
maintainer: Chris Martin, Julie Moronuki

copyright: 2017 Mission Valley Software LLC
license: Apache-2.0
license-file: license.txt

build-type: Simple

extra-source-files: example.png example.svg README.md

common base
    default-language: Haskell2010
    default-extensions:
        BlockArguments
        DeriveDataTypeable
        DeriveFoldable
        DeriveFunctor
        GeneralizedNewtypeDeriving
        LambdaCase
        NoImplicitPrelude
        ScopedTypeVariables
    ghc-options: -Wall
    build-depends: base >= 4.14 && < 4.17
    build-depends: containers >= 0.6.5.1 && < 0.7

common test
    import: base
    hs-source-dirs: test
    ghc-options: -threaded
    build-depends: loc

library
    import: base
    hs-source-dirs: src
    exposed-modules:
        Data.Loc
        Data.Loc.Area
        Data.Loc.Exception
        Data.Loc.Internal.Map
        Data.Loc.Internal.Prelude
        Data.Loc.List.OneToTwo
        Data.Loc.List.ZeroToTwo
        Data.Loc.Loc
        Data.Loc.Pos
        Data.Loc.Span
        Data.Loc.SpanOrLoc
        Data.Loc.Types

test-suite test-loc-properties
    import: test
    type: exitcode-stdio-1.0
    default-extensions: TemplateHaskell
    main-is: Main.hs
    hs-source-dirs: loc-test-src
    other-modules: Test.Loc.Hedgehog.Gen
    build-depends:
        hspec
      , hspec-hedgehog
      , hedgehog ^>= 1.0.2 || ^>= 1.1