cabal-version:      2.4

-- Initial package description 'monadic-bang.cabal' generated by
-- 'cabal init'. For further documentation, see:
--   http://haskell.org/cabal/users-guide/
--
-- The name of the package.
name:               monadic-bang

-- The package version.
-- See the Haskell package versioning policy (PVP) for standards
-- guiding when and how versions should be incremented.
-- https://pvp.haskell.org
-- PVP summary:      +-+------- breaking API changes
--                   | | +----- non-breaking API additions
--                   | | | +--- code changes with no API change
version:            0.1.1.0

-- A short (one-line) description of the package.
synopsis:           GHC plugin to desugar ! into do-notation

-- A longer description of the package.
description:        A plugin for GHC which takes expressions prefixed with a !
                    and effectively takes them out of their monadic context, by
                    creating bind statements in the do-block surrounding the
                    expression. Inspired by Idris's !-notation. For more
                    information, see README.md.

-- URL for the project homepage or repository.
homepage:           https://github.com/JakobBruenker/monadic-bang

-- A URL where users can report bugs.
bug-reports:        https://github.com/JakobBruenker/monadic-bang/issues

-- The license under which the package is released.
license:            MIT

-- The package author(s).
author:             Jakob Brünker

-- An email address to which users can send suggestions, bug reports, and patches.
maintainer:         jakob.bruenker@gmail.com

-- A copyright notice.
-- copyright:
category:           Development

extra-doc-files:
    CHANGELOG.md
    README.md

tested-with:        GHC == 9.4.7
                    GHC == 9.6.3
                    GHC == 9.8.1
                    GHC == 9.10.1

source-repository head
    type:           git
    location:       https://github.com/JakobBruenker/monadic-bang.git

library
    -- Modules exported by the library.
    exposed-modules:  MonadicBang
                      MonadicBang.Internal
                      MonadicBang.Internal.Effect.Offer
                      MonadicBang.Internal.Effect.Uniques
                      MonadicBang.Internal.Effect.Writer.Discard
                      MonadicBang.Internal.Options
                      MonadicBang.Internal.Utils
                      MonadicBang.Internal.Error

    -- Modules included in this library but not exported.
    -- other-modules:

    -- LANGUAGE extensions used by modules in this package.
    other-extensions: ScopedTypeVariables,
                      BlockArguments,
                      LambdaCase,
                      GADTs,
                      RecordWildCards,
                      OverloadedRecordDot,
                      NoFieldSelectors,
                      ViewPatterns,
                      StrictData,
                      PatternSynonyms

    -- Other library packages from which modules are imported.
    build-depends:    base >=4.17.0.0 && <4.21,
                      ghc >=9.4 && <9.11,
                      containers ^>=0.6.4.1 || ^>=0.7,
                      transformers >=0.5.6.2 && <0.7,
                      fused-effects ^>=1.1.1.2

    -- Directories containing source files.
    hs-source-dirs:   src

    -- Base language which the package is written in.
    default-language: GHC2021

    ghc-options:      -Wall -Wcompat

test-suite monadic-bang-test
    -- Base language which the package is written in.
    default-language: GHC2021

    -- The interface type and version of the test suite.
    type:             exitcode-stdio-1.0

    -- Directories containing source files.
    hs-source-dirs:   test

    -- The entrypoint to the test suite.
    main-is:          MonadicBang/Test.hs

    other-modules:    MonadicBang.Test.Utils.RunGhcParser
                      MonadicBang.Test.Utils.QualifiedDo
                      MonadicBang.Test.Utils
                      MonadicBang.Test.ShouldPass
                      MonadicBang.Test.ShouldFail

    -- Test dependencies.
    build-depends:    base,
                      ghc,
                      ghc-boot >=9.4 && <9.11,
                      ghc-paths ^>=0.1.0.12,
                      transformers,
                      monadic-bang

    ghc-options:      -Wall -Wcompat -plugin-package=monadic-bang