cabal-version:   1.18
name:            j
version:         0.2.1.0
license:         BSD3
license-file:    LICENSE
copyright:       Copyright: (c) 2020 Vanessa McHale
maintainer:      vamchale@gmail.com
author:          Vanessa McHale
synopsis:        J in Haskell
description:     Haskell library for calling J
category:        Interpreters, FFI, Array, J
build-type:      Simple
extra-doc-files:
    README.md
    CHANGELOG.md

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

library
    exposed-modules:  Language.J
    hs-source-dirs:   src
    default-language: Haskell2010
    other-extensions: FlexibleContexts OverloadedStrings
    ghc-options:      -Wall
    build-depends:
        base >=4.7 && <5,
        bytestring >=0.10,
        repa >=3.2.5.0

    if !os(windows)
        build-depends: unix >=2.7.0.0

    else
        build-depends: Win32 -any

    if !impl(ghc >=8.0)
        build-depends: semigroups -any

    if impl(ghc >=8.0)
        ghc-options:
            -Wincomplete-uni-patterns -Wincomplete-record-updates
            -Wredundant-constraints -Widentities

    if impl(ghc >=8.4)
        ghc-options: -Wmissing-export-lists

    if impl(ghc >=8.2)
        ghc-options: -Wcpp-undef

    if impl(ghc >=8.10)
        ghc-options: -Wunused-packages

test-suite j-test
    type:             exitcode-stdio-1.0
    main-is:          Spec.hs
    hs-source-dirs:   test
    default-language: Haskell2010
    other-extensions: CPP OverloadedStrings
    ghc-options:      "-with-rtsopts -K1K" -Wall
    build-depends:
        base -any,
        j -any,
        tasty -any,
        tasty-hunit -any,
        repa -any,
        bytestring -any

    if impl(ghc >=8.0)
        ghc-options:
            -Wincomplete-uni-patterns -Wincomplete-record-updates
            -Wredundant-constraints -Widentities

    if impl(ghc >=8.4)
        ghc-options: -Wmissing-export-lists

    if impl(ghc >=8.2)
        ghc-options: -Wcpp-undef

    if impl(ghc >=8.10)
        ghc-options: -Wunused-packages