cabal-version:   3.8
name:            mtg
version:         0.1.0.0
license:         MIT
license-file:    LICENSE
build-type:      Simple
extra-doc-files: CHANGELOG.md

common warnings
    ghc-options: -Wall

library
    import:           warnings
    exposed-modules:
        Deck.Category,
        Deck.Deck,
        Deck.Diff,
        Parser,
        Repr.StateRep,
        Repr.DiffRep,
        Repr.Interpret,
        Repr.InvDiff,
        Util,
        Deckvine.Patch.Prim,
    other-modules:
        ResourceQueue,
    build-depends:
        base ^>=4.18.1.0,
        vector >= 0.13.1 && < 0.14,
        text >= 2.0.2 && < 2.1,
        refined >= 0.8 && < 0.9,
        cassava >= 0.5 && < 0.6,
        bytestring >= 0.11.5 && < 0.12,
        NanoID >= 3.4 && < 3.5,
        mwc-random >= 0.13 && < 0.16,
        containers >= 0.6.7 && < 0.7,
        extra,
        mtl,
        lens,
        async,
        attoparsec,
    hs-source-dirs:   src
    default-language: Haskell2010

executable mtg
    import:           warnings
    main-is:          Main.hs
    build-depends:
        base ^>=4.18.1.0,
        mtg,
        optparse-applicative,
        text,

    hs-source-dirs:   app/cli
    default-language: Haskell2010

executable deckvine-discord
    import: warnings
    main-is: Main.hs
    build-depends:
        base ^>=4.18.1.0,
        mtg,
        text,
        discord-haskell,
        mtl,
        transformers,
        lens,
        aeson,
        req,
        modern-uri,
        bytestring,

    hs-source-dirs: app/discord
    default-language: Haskell2010

test-suite mtg-test
    import:           warnings
    default-language: Haskell2010
    type:             exitcode-stdio-1.0
    hs-source-dirs:   test
    main-is:          Main.hs
    build-depends:
        base ^>=4.18.1.0,
        mtg,
        tasty,
        tasty-golden,
        bytestring,
        text,
        filepath,
        extra,