cabal-version:      2.2
name:               jacinda
version:            3.0.0.0
x-revision: 3
license:            AGPL-3.0-only
license-file:       COPYING
maintainer:         vamchale@gmail.com
author:             Vanessa McHale
bug-reports:        https://github.com/vmchale/jacinda/issues
synopsis:           Functional, expression-oriented data processing language
description:
    APL meets AWK. A command-line tool for summarizing and reporting, powered by Rust's [regex](https://docs.rs/regex/regex/) library.

category:           Language, Interpreters, Text, Data
build-type:         Simple
data-files:
    lib/*.jac
    lib/csv/*.jac
    lib/fs/*.jac
    prelude/*.jac

extra-source-files:
    CHANGELOG.md
    README.md
    man/ja.1
    doc/guide.pdf
    test/examples/*.jac
    examples/*.jac

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

flag cross
    description: Enable to ease cross-compiling
    default:     False
    manual:      True

common warnings
    ghc-options:
        -Wincomplete-uni-patterns -Wincomplete-record-updates
        -Wredundant-constraints -Widentities -Wcpp-undef
        -Wmissing-export-lists -Wunused-packages

library jacinda-lib
    import:           warnings
    exposed-modules:
        Parser
        Parser.Rw
        A
        Ty
        Ty.Const
        Jacinda.Regex
        File

    hs-source-dirs:   src
    other-modules:
        A.I
        A.E
        L
        Jacinda.Fuse
        Nm
        U
        R
        Jacinda.Check.Field
        Jacinda.Backend.Parse
        Jacinda.Backend.Const
        Jacinda.Backend.T
        Jacinda.Backend.Printf
        Include
        Paths_jacinda

    autogen-modules:  Paths_jacinda
    default-language: Haskell2010
    ghc-options:      -Wall -O2 -Wno-missing-signatures -Wno-x-partial
    build-depends:
        base >=4.11.0.0 && <5,
        bytestring >=0.11.2.0,
        text,
        prettyprinter >=1.7.0,
        containers >=0.6.0.1,
        array,
        mtl,
        transformers,
        regex-rure >=0.1.2.0 && <1.0.0.0,
        microlens,
        directory,
        filepath,
        microlens-mtl >=0.1.8.0,
        vector >=0.12.2.0,
        recursion >=1.0.0.0,
        split,
        deepseq

    other-extensions:
        OverloadedStrings
        OverloadedLists
        DeriveFunctor
        FlexibleContexts
        DeriveAnyClass
        DeriveGeneric
        TypeFamilies

    if !flag(cross)
        build-tool-depends: alex:alex >=3.5.0.0, happy:happy

executable ja
    import:           warnings
    main-is:          Main.hs
    hs-source-dirs:   x
    other-modules:    Paths_jacinda
    autogen-modules:  Paths_jacinda
    default-language: Haskell2010
    ghc-options:      -Wall -rtsopts "-with-rtsopts=-A200k -k32k"
    build-depends:
        base,
        jacinda-lib,
        optparse-applicative >=0.14.1.0,
        text

    ghc-options:
        -Wincomplete-uni-patterns -Wincomplete-record-updates
        -Wredundant-constraints -Widentities -Wcpp-undef
        -Wmissing-export-lists -Wunused-packages

test-suite jacinda-test
    import:           warnings
    type:             exitcode-stdio-1.0
    main-is:          Spec.hs
    hs-source-dirs:   test
    default-language: Haskell2010
    ghc-options:      -Wall -threaded -rtsopts "-with-rtsopts=-N -K1K" -Wall
    build-depends:
        base,
        jacinda-lib,
        tasty,
        bytestring,
        text,
        tasty-hunit

benchmark jacinda-bench
    import:           warnings
    type:             exitcode-stdio-1.0
    main-is:          Bench.hs
    hs-source-dirs:   bench
    default-language: Haskell2010
    ghc-options:      -Wall -rtsopts "-with-rtsopts=-A200k -k32k"
    build-depends:
        base,
        criterion,
        jacinda-lib,
        deepseq,
        text,
        silently