packages feed

heftia-effects-0.3.1.0: heftia-effects.cabal

cabal-version:      2.4
name:               heftia-effects
version:            0.3.1.0

-- A short (one-line) description of the package.
synopsis: higher-order effects done right

-- A longer description of the package.
description:
    This library is the battery-included version of the [heftia](https://hackage.haskell.org/package/heftia) package,
    providing interpreters for standard effects.

-- A URL where users can report bugs.
bug-reports: https://github.com/sayo-hs/heftia

-- The license under which the package is released.
license:            MPL-2.0
license-file:       LICENSE
author:             Yamada Ryo <ymdfield@outlook.jp>
maintainer:         Yamada Ryo <ymdfield@outlook.jp>

-- A copyright notice.
copyright: 2023-2024 Yamada Ryo
category: Control, Effect, Monads

extra-source-files:
    ChangeLog.md
    NOTICE
    README.md

tested-with:
    GHC == 9.2.8

source-repository head
    type: git
    location: https://github.com/sayo-hs/heftia
    tag: v0.2.0
    subdir: heftia-effects

common common-base
    ghc-options:      -Wall
    default-language: GHC2021

    default-extensions:
        LambdaCase,
        DerivingStrategies,
        DataKinds,
        TypeFamilies,
        BlockArguments,
        FunctionalDependencies,
        RecordWildCards,
        DefaultSignatures,
        PatternSynonyms

    build-depends:
        base ^>= 4.16,
        ghc-typelits-knownnat ^>= 0.7,
        data-effects ^>= 0.1.2,
        heftia ^>= 0.3.1,

    ghc-options: -Wall -fplugin GHC.TypeLits.KnownNat.Solver

library
    import: common-base

    exposed-modules:
        Control.Effect.Interpreter.Heftia.Reader
        Control.Effect.Interpreter.Heftia.Writer
        Control.Effect.Interpreter.Heftia.State
        Control.Effect.Interpreter.Heftia.Except
        Control.Effect.Interpreter.Heftia.ShiftReset
        Control.Effect.Interpreter.Heftia.NonDet
        Control.Effect.Interpreter.Heftia.Coroutine
        Control.Effect.Interpreter.Heftia.Input
        Control.Effect.Interpreter.Heftia.Output
        Control.Effect.Interpreter.Heftia.Provider
        Control.Effect.Interpreter.Heftia.Provider.Implicit
        Control.Effect.Interpreter.Heftia.Resource
        Control.Effect.Interpreter.Heftia.Unlift
        Control.Effect.Interpreter.Heftia.KVStore
        Control.Effect.Interpreter.Heftia.Fresh
        Control.Effect.Interpreter.Heftia.Fail
        Control.Effect.Interpreter.Heftia.Concurrent.Timer

    reexported-modules:
        Control.Effect.Hefty,
        Control.Effect.Free,
        Control.Effect.ExtensibleFinal,
        Control.Effect.ExtensibleChurch,
        Control.Effect.ExtensibleTree,
        Control.Effect.ExtensibleFinalA,
        Control.Effect.ExtensibleTreeA,
        Control.Effect.ExtensibleFastA,
        Control.Hefty,
        Control.Freer,
        Control.Freer.Final,
        Control.Monad.Freer,
        Control.Monad.Freer.Church,
        Control.Monad.Freer.Tree,
        Data.Hefty.Union,
        Data.Hefty.Extensible,
        Data.Free.Sum,
        Data.Effect,
        Data.Effect.TH,
        Data.Effect.Tag,
        Data.Effect.Key,
        Data.Effect.Key.TH,
        Data.Effect.HFunctor,
        Data.Effect.HFunctor.HCont,
        Data.Effect.HFunctor.TH,
        Control.Effect,
        Control.Effect.Tag,
        Control.Effect.Key,
        Data.Effect.Reader,
        Data.Effect.Writer,
        Data.Effect.State,
        Data.Effect.Except,
        Data.Effect.ShiftReset,
        Data.Effect.NonDet,
        Data.Effect.Coroutine,
        Data.Effect.Input,
        Data.Effect.Output,
        Data.Effect.Provider,
        Data.Effect.Provider.Implicit,
        Data.Effect.Resource,
        Data.Effect.Unlift,
        Data.Effect.KVStore,
        Data.Effect.Fresh,
        Data.Effect.Fail,
        Data.Effect.Concurrent.Timer,

    -- Modules included in this executable, other than Main.
    -- other-modules:

    -- LANGUAGE extensions used by modules in this package.
    -- other-extensions:
    build-depends:
        mtl                           ^>= 2.2.2,
        transformers                  ^>= 0.5.6,
        extensible                    ^>= 0.9,
        unliftio                      ^>= 0.2.0,
        free                          ^>= 5.2,
        containers                    ^>= 0.6.5,
        extra                         ^>= 1.7.14,
        time                          ^>= 1.11.1,
        unbounded-delays              ^>= 0.1.1,

    hs-source-dirs:   src

test-suite test
    import: common-base

    main-is: Driver.hs
    other-modules:

    hs-source-dirs: test

    build-depends:
        heftia-effects,
        tasty                         ^>= 1.4,
        tasty-hspec,
        hspec,
        unliftio,

    build-tool-depends:
        tasty-discover:tasty-discover

    type: exitcode-stdio-1.0


executable Teletype
    import: common-base

    main-is: Main.hs
    hs-source-dirs: Example/Teletype
    build-depends:
        heftia-effects,

executable KeyedEffects
    import: common-base

    main-is: Main.hs
    hs-source-dirs: Example/KeyedEffects
    build-depends:
        heftia-effects,

executable Logging
    import: common-base

    main-is: Main.hs
    hs-source-dirs: Example/Logging
    build-depends:
        heftia-effects,
        text >= 2.0 && < 2.2,
        time ^>= 1.11.1,

executable Continuation
    import: common-base

    main-is: Main.hs
    hs-source-dirs: Example/Continuation
    build-depends:
        heftia-effects,

executable Continuation2
    import: common-base

    main-is: Main.hs
    hs-source-dirs: Example/Continuation2
    build-depends:
        heftia-effects,
        extra ^>= 1.7.14,

executable Writer
    import: common-base

    main-is: Main.hs
    hs-source-dirs: Example/Writer
    build-depends:
        heftia-effects,

executable SemanticsZoo
    import: common-base

    main-is: Main.hs
    hs-source-dirs: Example/SemanticsZoo
    build-depends:
        heftia-effects,