packages feed

heftia-0.4.0.0: heftia.cabal

cabal-version:      2.4
name:               heftia
version:            0.4.0.0

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

-- A longer description of the package.
description:
    Heftia is an extensible effects library that generalizes "Algebraic Effects and Handlers" to higher-order effects, providing users with maximum flexibility and delivering standard and reasonable speed.
    In its generalization, the focus is on ensuring predictable results based on simple, consistent semantics, while preserving soundness.
    .
    Please refer to the [Haddock documentation](https://hackage.haskell.org/package/heftia-0.4.0.0/docs/Control-Monad-Hefty.html) for usage and semantics.
    For information on performance, please refer to [performance.md](https://github.com/sayo-hs/heftia/blob/v0.4.0/benchmark/performance.md).
    .
    The library allows the following effects with well-defined semantics:
    .
    * Coroutines
    * Non-deterministic computations
    * `MonadUnliftIO`
    .
    This library is inspired by the paper:
    .
    * Casper Bach Poulsen and Cas van der Rest. 2023. Hefty Algebras: Modular
        Elaboration of Higher-Order Algebraic Effects. Proc. ACM Program. Lang. 7,
        POPL, Article 62 (January 2023), 31 pages. <https://doi.org/10.1145/3571255>
    .
    The /elaboration/ approach proposed in the above paper allows for a straightforward treatment of higher-order effects.
    .
    Heftia's data structure is an extension of the Freer monad, designed to be theoretically straightforward by eliminating ad-hoc elements.


-- 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:             Sayo Koyoneda <ymdfield@outlook.jp>
maintainer:         Sayo Koyoneda <ymdfield@outlook.jp>

-- A copyright notice.
copyright:
    2023-2024 Sayo Koyoneda
    2016 Allele Dev; 2017 Ixperta Solutions s.r.o.; 2017 Alexis King
category: Control, Monads

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

tested-with:
    GHC == 9.8.2
    GHC == 9.4.1

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

library
    exposed-modules:
        Control.Monad.Hefty
        Control.Monad.Hefty.Types
        Control.Monad.Hefty.Interpret
        Control.Monad.Hefty.Interpret.State
        Control.Monad.Hefty.Transform
        Data.Effect.OpenUnion
        Data.Effect.OpenUnion.Internal
        Data.Effect.OpenUnion.Internal.FO
        Data.Effect.OpenUnion.Internal.HO
        Data.Effect.OpenUnion.Sum

    reexported-modules:
        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,

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

    -- LANGUAGE extensions used by modules in this package.
    -- other-extensions:
    build-depends:
        base                          >= 4.17 && < 4.21,
        data-effects                  ^>= 0.2,
        freer-simple                  ^>= 1.2.1.2,
        mtl                           >= 2.2.2 && < 2.4,
        unliftio                      ^>= 0.2,

    hs-source-dirs:   src
    ghc-options:      -Wall
    default-language: GHC2021

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


test-suite test
    main-is: Driver.hs
    hs-source-dirs: test
    build-depends:
        heftia,
        base,
        tasty                         >= 1.4 && < 1.6,
        tasty-hunit                   ^>= 0.10,

    type: exitcode-stdio-1.0

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

    default-language: GHC2021

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