packages feed

classy-effects-th 0.1.0.0 → 0.1.0.1

raw patch · 4 files changed

+113/−11 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

README.md view
@@ -1,12 +1,21 @@+# Status (2024) : **This `classy-effects` project was abandoned due to the discovery of fundamental difficulties.**+The reasons are as follows: https://github.com/orgs/sayo-hs/projects/4?pane=issue&itemId=48547880++**As an alternative, consider using `sayo-hs/data-effects`, a GADTs-based common effect representation foundation:** https://github.com/sayo-hs/data-effects+ # classy-effects +[![Hackage](https://img.shields.io/hackage/v/classy-effects.svg?logo=haskell&label=classy-effects)](https://hackage.haskell.org/package/classy-effects)+[![Hackage](https://img.shields.io/hackage/v/classy-effects-th.svg?logo=haskell&label=classy-effects-th)](https://hackage.haskell.org/package/classy-effects-th)+[![Hackage](https://img.shields.io/hackage/v/classy-effects-base.svg?logo=haskell&label=classy-effects-base)](https://hackage.haskell.org/package/classy-effects-base)+ This repository is for **CEPs** and its associated Haskell library.  CEPs (Classy-Effects Protocols) are a collection of protocols for expressing and defining effects in Haskell, aimed at the fist objective in the [Sayo Project](https://github.com/sayo-hs):  > Exploring ways to improve interoperability among the myriad Haskell effect system libraries -For more details, please refer to [CEPs/README.md](https://github.com/sayo-hs/classy-effects/blob/master/CEPs/README.md).+For more details, please refer to [CEPs/README.md](CEPs/README.md).  ## Background In Haskell, there are numerous libraries to realize an effect system. The issue here is interoperability between these libraries. For instance, the [Reader effect in `fused-effects`](https://hackage.haskell.org/package/fused-effects-1.1.2.2/docs/Control-Effect-Reader.html#t:Reader) and the [Reader effect in `polysemy`](https://hackage.haskell.org/package/polysemy-1.9.1.1/docs/Polysemy-Reader.html) have completely identical definitions. If we could extract and define effects purely as interfaces, eliminating this redundancy in effect definitions, then an effectful program could be handled by both effect system library A and effect system library B. The specific mechanisms for handling effects vary from one library to another, and unifying them isn't the goal. We're specifically looking to unify the overlapping and common definitions of effects as interfaces.@@ -22,4 +31,22 @@ Examples of using classy-effects combined with the Heftia effect handler backend can be found [here](https://github.com/sayo-hs/heftia/blob/master/docs/examples/01%20First-order.md).  ## Your contributions are welcome!-Please see [CONTRIBUTING.md](https://github.com/sayo-hs/classy-effects/blob/master/CONTRIBUTING.md).+Please see [CONTRIBUTING.md](CONTRIBUTING.md).++## Credits+Parts of this project have been adapted or inspired by the following resources:++* **[Hefty Algebras -- The Artifact](https://github.com/heft-lang/POPL2023)**+    * **Copyright** (c) 2023 Casper Bach Poulsen and Cas van der Rest+    * **License**: MIT+    * **Modifications**: The inspiration for the idea of Heftia. Code was used in the definition of [`LiftIns`](https://github.com/sayo-hs/classy-effects/blob/5b6ccb1f2bcfef804692bc13996e060bd0739475/classy-effects-base/src/Control/Effect/Class.hs#L49).++* **[effet](https://github.com/typedbyte/effet)**+    * **Copyright** (c) 2020 Michael Szvetits+    * **License**: BSD-3-Clause+    * **Modifications**: Used TemplateHaskell code to handle the effect type class.++* **[compdata](https://github.com/pa-ba/compdata)**+    * **Copyright** (c) 2010--2011 Patrick Bahr, Tom Hvitved+    * **License**: BSD-3-Clause+    * **Modifications**: Used TemplateHaskell code to derive instances of the `HFunctor` type class.
classy-effects-th.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               classy-effects-th-version:            0.1.0.0+version:            0.1.0.1  -- A short (one-line) description of the package. synopsis: Automatic compliance with the classy-effects protocols@@ -9,13 +9,18 @@ description:     This package provides Template Haskell functions that enable automatic compliance with CEPs     (classy-effects protocols), offering a unified framework for defining effects in Haskell.-+    .     CEPs aim to standardize and unify the definition of effects in Haskell in a     backend-library-agnostic manner. Please refer     to [CEPs](https://github.com/sayo-hs/classy-effects/blob/master/CEPs/README.md) for details.-+    .     Please also refer to the [classy-effects](https://hackage.haskell.org/package/classy-effects)     package, which offers standard effect definitions compliant with CEPs.+    .+    __This 'classy-effects' project was abandoned due to the discovery of fundamental difficulties.__+    The reasons are as follows: <https://github.com/orgs/sayo-hs/projects/4?pane=issue&itemId=48547880>+    __As an alternative, consider using 'sayo-hs/data-effects', a GADTs-based common effect representation foundation:__+    <https://github.com/sayo-hs/data-effects>.  -- A URL where users can report bugs. bug-reports: https://github.com/sayo-hs/classy-effects
src/Data/Effect/Class/TH/HFunctor/Internal.hs view
@@ -4,10 +4,45 @@ -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at https://mozilla.org/MPL/2.0/. -{--The code before modification is BSD3 licensed, (c) 2010-2011 Patrick Bahr.-<https://github.com/pa-ba/compdata/blob/master/src/Data/Comp/Multi/Derive/HFunctor.hs>+{-  The code before modification is licensed under the BSD3 License as+    shown in [1].  The modified code, in its entirety, is licensed under+    MPL 2.0. When redistributing, please ensure that you do not remove+    the BSD3 License text as indicated in [1].+    <https://github.com/pa-ba/compdata/blob/master/src/Data/Comp/Multi/Derive/HFunctor.hs> +    [1] Copyright (c) 2010--2011 Patrick Bahr, Tom Hvitved++        All rights reserved.++        Redistribution and use in source and binary forms, with or without+        modification, are permitted provided that the following conditions+        are met:++        1. Redistributions of source code must retain the above copyright+        notice, this list of conditions and the following disclaimer.++        2. Redistributions in binary form must reproduce the above copyright+        notice, this list of conditions and the following disclaimer in the+        documentation and/or other materials provided with the distribution.++        3. Neither the name of the author nor the names of his contributors+        may be used to endorse or promote products derived from this software+        without specific prior written permission.++        THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR+        IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED+        WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE+        DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR+        ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL+        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS+        OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)+        HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,+        STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN+        ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE+        POSSIBILITY OF SUCH DAMAGE.+-}++{- This fork was made to work around the problem that the 'Control.Effect.Class.Machinery.TH.makeEffect' function that generates multiple definitions at once for convenience is not possible with only the original@@ -18,7 +53,7 @@ -}  {- |-Copyright   :  (c) 2010-2011 Patrick Bahr+Copyright   :  (c) 2010-2011 Patrick Bahr, Tom Hvitved                (c) 2023 Yamada Ryo License     :  MPL-2.0 (see the file LICENSE) Maintainer  :  ymdfield@outlook.jp
src/Data/Effect/Class/TH/Internal.hs view
@@ -4,8 +4,43 @@ -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at https://mozilla.org/MPL/2.0/. --- The code before modification is BSD3 licensed, (c) 2020 Michael Szvetits.--- <https://github.com/typedbyte/effet/blob/master/src/Control/Effect/Machinery/TH.hs>+{-  The code before modification is licensed under the BSD3 License as+    shown in [1]. The modified code, in its entirety, is licensed under+    MPL 2.0. When redistributing, please ensure that you do not remove+    the BSD3 License text as indicated in [1].+    <https://hackage.haskell.org/package/effet-0.4.0.0/docs/src/Control.Effect.Machinery.TH.html>++    [1] Copyright Michael Szvetits (c) 2020++        All rights reserved.++        Redistribution and use in source and binary forms, with or without+        modification, are permitted provided that the following conditions are met:++            * Redistributions of source code must retain the above copyright+            notice, this list of conditions and the following disclaimer.++            * Redistributions in binary form must reproduce the above+            copyright notice, this list of conditions and the following+            disclaimer in the documentation and/or other materials provided+            with the distribution.++            * Neither the name of Michael Szvetits nor the names of other+            contributors may be used to endorse or promote products derived+            from this software without specific prior written permission.++        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+        "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+        LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+        A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+        OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+        SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+        LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+        DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+        THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+        (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.+-}  {- | Copyright   :  (c) 2020 Michael Szvetits