cabal-version:      3.0
name:               javelin
version:            0.1.0.0
synopsis:           Labeled one-dimensional arrays
license:            MIT
license-file:       LICENSE
author:             Laurent René de Cotret
maintainer:         laurent.decotret@outlook.com
category:           Data, Data Structures, Data Science
build-type:         Simple
extra-doc-files:    CHANGELOG.md
                    files/aapl.txt
tested-with:        GHC ==9.8.1 
                     || ==9.6.3
                     || ==9.4.7  
description:
        
        This package implements 'Series', labeled one-dimensional arrays
        combining properties from maps and arrays.
        
        To get started, the important modules are:
        
        ["Data.Series"] Boxed series of arbitrary types.
        
        ["Data.Series.Unboxed"] Series of unboxed data types for better performance, at the cost of flexibility.
        
        ["Data.Series.Generic"] Generic interface to manipulate any type of 'Series'.
        
        ["Data.Series.Index"] Index containing series keys.
        
        To get started, please take a look at the tutorial ("Data.Series.Tutorial").
        

common common
    default-language: GHC2021
    ghc-options: -Wall
                 -Wcompat
                 -Widentities
                 -Wincomplete-uni-patterns
                 -Wincomplete-record-updates
                 -Wredundant-constraints
                 -fhide-source-paths
                 -Wpartial-fields

library
    import:           common
    hs-source-dirs:   src
    exposed-modules:  Data.Series
                      Data.Series.Generic
                      Data.Series.Generic.Internal
                      Data.Series.Index
                      Data.Series.Index.Internal
                      Data.Series.Tutorial
                      Data.Series.Unboxed
    other-modules:    Data.Series.Generic.Aggregation
                      Data.Series.Generic.Definition
                      Data.Series.Generic.Numeric
                      Data.Series.Generic.Scans
                      Data.Series.Generic.View
                      Data.Series.Generic.Zip
                      Data.Series.Index.Definition
    build-depends:    base                >=4.15.0.0 && <4.20,
                      containers          >=0.6      && <0.8,
                      deepseq             >=1.4      && <1.6,
                      foldl               ^>=1.4,
                      indexed-traversable ^>=0.1,
                      vector              >=0.12.3.0 && <0.14,
                      vector-algorithms   ^>=0.9

test-suite javelin-test
    import:           common
    type:             exitcode-stdio-1.0
    hs-source-dirs:   test
    main-is:          Main.hs
    other-modules:    Test.Data.Series
                      Test.Data.Series.Index
                      Test.Data.Series.Generic.Aggregation
                      Test.Data.Series.Generic.Definition
                      Test.Data.Series.Generic.Numeric
                      Test.Data.Series.Generic.View
                      Test.Data.Series.Generic.Zip
                      Test.Utils
    build-depends:    base,
                      containers,
                      foldl,
                      hedgehog,
                      HUnit,
                      ieee754,
                      javelin,
                      statistics,
                      tasty,
                      tasty-hedgehog,
                      tasty-hspec,
                      tasty-hunit,
                      vector


-- Running the 'comparison-containers' benchmark is expected
-- to be done in conjunction with the cabal.project.profiling project file:
-- > cabal bench comparison-containers --project=cabal.project.profiling
benchmark comparison-containers
    import:           common
    type:             exitcode-stdio-1.0
    ghc-options:      -rtsopts
    hs-source-dirs:   benchmarks
    main-is:          Comparison.hs
    build-depends:    base,
                      containers,
                      foldl,
                      mono-traversable,
                      javelin,
                      vector, 
                      criterion, 
                      deepseq, 
                      random, 
                      directory


-- Running the 'operations' benchmark is expected
-- to be done in conjunction with the cabal.project.profiling project file:
-- > cabal bench operations --project=cabal.project.profiling
benchmark operations
    import:           common
    type:             exitcode-stdio-1.0
    ghc-options:      -rtsopts
    hs-source-dirs:   benchmarks
    main-is:          Operations.hs
    build-depends:    base,
                      containers,
                      deepseq,
                      foldl,
                      javelin,
                      criterion


executable bench-report
    import:           common
    main-is:          bench-report.hs
    hs-source-dirs:   scripts
    build-depends:    base, 
                      csv ^>=0.1