cabal-version:      3.0
name:               rlp
version:            0.1.0.0
-- synopsis:
-- description:
license:            GPL-2.0-only
-- license-file:       LICENSE
author:             crumbtoo
maintainer:         crumb@disroot.org
-- copyright:
category:           Language
build-type:         Simple
extra-doc-files:    README.md
-- extra-source-files:

common warnings
    ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-unused-top-binds

library
    import:           warnings
    exposed-modules:  Core
                    , TI
                    , GM
                    , Compiler.RLPC
                    , Core.Syntax

    other-modules:    Data.Heap
                    , Data.Pretty
                    , Core.Parse
                    , Core.TH
                    , Core.Examples
                    , Core.Lex
                    , Control.Monad.Errorful

    build-tool-depends: happy:happy, alex:alex

    -- other-extensions:
    build-depends:    base ^>=4.18.0.0
                    , containers
                    , microlens
                    , microlens-th
                    , mtl
                    , template-haskell
                    -- required for happy
                    , array
                    , data-default-class
                    , unordered-containers
                    , hashable
                    , pretty

    hs-source-dirs:   src
    default-language: GHC2021

executable rlpc
    import:           warnings
    main-is:          Main.hs
    -- other-modules:
    -- other-extensions:
    build-depends: base ^>=4.18.0.0
                 , rlp
                 , optparse-applicative
                 , microlens
                 , microlens-mtl
                 , mtl
                 , unordered-containers

    hs-source-dirs:   app
    default-language: GHC2021

test-suite rlp-test
    import:           warnings
    default-language: GHC2021
    -- import: deps, test-deps
    type: exitcode-stdio-1.0
    hs-source-dirs: tst
    main-is: Main.hs
    build-depends: base ^>=4.18.0.0
                 , rlp
                 , QuickCheck
    other-modules: Arith

