repos / line-indexed-cursor.hs.git


Evgenii Akentev  ·  2023-07-23

line-indexed-cursor.cabal

 1cabal-version:      3.0
 2name:               line-indexed-cursor
 3version:            0.1.0.0
 4synopsis:           Line-indexed file reader.
 5description:        Lazily builds the index with the line numbers while reading the file making it possible to rewind to them quickly later.
 6license:            MIT
 7license-file:       LICENSE
 8author:             Evgenii Akentev
 9maintainer:         i@ak3n.com
10category:           Development, Library, Data
11build-type:         Simple
12extra-doc-files:    CHANGELOG.md
13
14common warnings
15    ghc-options:
16      -Wall -Wnoncanonical-monad-instances -Wincomplete-uni-patterns
17      -Wincomplete-record-updates -Wredundant-constraints -Widentities
18      -Wunused-packages -Wmissing-deriving-strategies
19
20library
21    import:           warnings
22    exposed-modules:  System.IO.LineIndexedCursor
23    build-depends:    base >= 4.7 && < 5, bytestring ^>= 0.11, array >= 0.5.2.0 && < 6
24    hs-source-dirs:   src
25    default-language: Haskell2010
26
27test-suite line-indexed-cursor-test
28    import:           warnings
29    default-language: Haskell2010
30    type:             exitcode-stdio-1.0
31    hs-source-dirs:   test
32    main-is:          Main.hs
33    build-depends:
34        base >= 4.7 && < 5,
35        hspec >= 2.10 && < 3,
36        line-indexed-cursor
37
38benchmark bench
39    import:           warnings
40    ghc-options:
41        -threaded
42        -rtsopts
43        -with-rtsopts=-N
44    default-language: Haskell2010
45    type:             exitcode-stdio-1.0
46    hs-source-dirs:   bench
47    main-is: Bench.hs
48    build-depends:
49        base >= 4.7 && < 5,
50        criterion >= 1.5 && < 2,
51        random >= 1 && < 2,
52        line-indexed-cursor