classy-effects-base 0.1.0.0 → 0.1.0.1
raw patch · 3 files changed
+62/−5 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- README.md +29/−2
- classy-effects-base.cabal +7/−2
- src/Control/Effect/Class.hs +26/−1
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 +[](https://hackage.haskell.org/package/classy-effects)+[](https://hackage.haskell.org/package/classy-effects-th)+[](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-base.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: classy-effects-base-version: 0.1.0.0+version: 0.1.0.1 -- A short (one-line) description of the package. synopsis: An interface for a handler-independent, typeclass-based effect system.@@ -10,12 +10,17 @@ This library provides definitions for CEPs (classy-effects protocols) 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.-+ . This library provides only the fundamental definitions for classy-effects. Please also refer to the [classy-effects](https://hackage.haskell.org/package/classy-effects) package, which offers standard effect definitions compliant with CEPs, and the [classy-effects-th](https://hackage.haskell.org/package/classy-effects-th) package, which enables automatic compliance 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/Control/Effect/Class.hs view
@@ -45,7 +45,32 @@ (https://github.com/heft-lang/POPL2023/blob/74afe1d5ce0b491cffe40cc5c73a2a5ee6a94d9c/haskell/src/Elab.hs#L9-L10). -} --- The code before modification is MIT licensed; (c) 2023 Casper Bach Poulsen and Cas van der Rest.+{- The code before modification is licensed under the MIT 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 MIT License text as indicated in [1].++ [1] Copyright (c) 2023 Casper Bach Poulsen and Cas van der Rest++ Permission is hereby granted, free of charge, to any person obtaining+ a copy of this software and associated documentation files (the+ "Software"), to deal in the Software without restriction, including+ without limitation the rights to use, copy, modify, merge, publish,+ distribute, sublicense, and/or sell copies of the Software, and to+ permit persons to whom the Software is furnished to do so, subject to+ the following conditions:++ The above copyright notice and this permission notice shall be+ included in all copies or substantial portions of the Software.++ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.+-} newtype LiftIns (ins :: Instruction) (f :: Type -> Type) a = LiftIns {unliftIns :: ins a} deriving stock (Functor, Foldable, Traversable)