classy-effects 0.1.0.0 → 0.1.0.1
raw patch · 2 files changed
+37/−5 lines, 2 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Control.Effect.Class.Accum: pattern AddS :: () => a_6989586621679057844 ~ () => w_acu8 -> LiftIns (AccumI w_acu8) f_acu9 a_6989586621679057844
- Control.Effect.Class.Coroutine: pattern YieldS :: () => a_6989586621679057204 ~ c_acjN => a_acjK -> (b_acjL -> c_acjN) -> LiftIns (CoroutineI a_acjK b_acjL) f_acjM a_6989586621679057204
- Control.Effect.Class.Except: pattern ThrowS :: () => a_6989586621679055770 ~ a_abW5 => e_abW3 -> LiftIns (ThrowI e_abW3) f_abW4 a_6989586621679055770
- Control.Effect.Class.Output: pattern OutputS :: () => a_6989586621679054565 ~ () => o_abDu -> LiftIns (OutputI o_abDu) f_abDv a_6989586621679054565
- Control.Effect.Class.State: pattern PutS :: () => a_6989586621679050567 ~ () => s_aaAP -> LiftIns (StateI s_aaAP) f_aaAQ a_6989586621679050567
- Control.Effect.Class.Writer: pattern TellS :: () => a_6989586621679047924 ~ () => w_a9KS -> LiftIns (TellI w_a9KS) f_a9KT a_6989586621679047924
+ Control.Effect.Class.Accum: pattern AddS :: () => a_6989586621679057859 ~ () => w_acun -> LiftIns (AccumI w_acun) f_acuo a_6989586621679057859
+ Control.Effect.Class.Coroutine: pattern YieldS :: () => a_6989586621679057219 ~ c_ack2 => a_acjZ -> (b_ack0 -> c_ack2) -> LiftIns (CoroutineI a_acjZ b_ack0) f_ack1 a_6989586621679057219
+ Control.Effect.Class.Except: pattern ThrowS :: () => a_6989586621679055785 ~ a_abWk => e_abWi -> LiftIns (ThrowI e_abWi) f_abWj a_6989586621679055785
+ Control.Effect.Class.Output: pattern OutputS :: () => a_6989586621679054580 ~ () => o_abDJ -> LiftIns (OutputI o_abDJ) f_abDK a_6989586621679054580
+ Control.Effect.Class.State: pattern PutS :: () => a_6989586621679050572 ~ () => s_aaAU -> LiftIns (StateI s_aaAU) f_aaAV a_6989586621679050572
+ Control.Effect.Class.Writer: pattern TellS :: () => a_6989586621679047856 ~ () => w_a9JM -> LiftIns (TellI w_a9JM) f_a9JN a_6989586621679047856
- Control.Effect.Class.Accum: [Add] :: forall w_acu8. () => w_acu8 -> AccumI w_acu8 ()
+ Control.Effect.Class.Accum: [Add] :: forall w_acun. () => w_acun -> AccumI w_acun ()
- Control.Effect.Class.Accum: [Look] :: forall w_acu8. () => AccumI w_acu8 w_acu8
+ Control.Effect.Class.Accum: [Look] :: forall w_acun. () => AccumI w_acun w_acun
- Control.Effect.Class.Accum: data AccumI (w_acu8 :: Type) (a_acv0 :: Type)
+ Control.Effect.Class.Accum: data AccumI (w_acun :: Type) (a_acvf :: Type)
- Control.Effect.Class.Accum: pattern LookS :: () => a_6989586621679057845 ~ w_acu8 => LiftIns (AccumI w_acu8) f_acu9 a_6989586621679057845
+ Control.Effect.Class.Accum: pattern LookS :: () => a_6989586621679057860 ~ w_acun => LiftIns (AccumI w_acun) f_acuo a_6989586621679057860
- Control.Effect.Class.Accum: type AccumS w_acu8 = LiftIns (AccumI w_acu8)
+ Control.Effect.Class.Accum: type AccumS w_acun = LiftIns (AccumI w_acun)
- Control.Effect.Class.Coroutine: [Yield] :: forall a_acjK b_acjL c_acjN. () => a_acjK -> b_acjL -> c_acjN -> CoroutineI a_acjK b_acjL c_acjN
+ Control.Effect.Class.Coroutine: [Yield] :: forall a_acjZ b_ack0 c_ack2. () => a_acjZ -> b_ack0 -> c_ack2 -> CoroutineI a_acjZ b_ack0 c_ack2
- Control.Effect.Class.Coroutine: data CoroutineI (a_acjK :: Type) (b_acjL :: Type) (a_ackF :: Type)
+ Control.Effect.Class.Coroutine: data CoroutineI (a_acjZ :: Type) (b_ack0 :: Type) (a_ackU :: Type)
- Control.Effect.Class.Coroutine: type CoroutineS a_acjK b_acjL = LiftIns (CoroutineI a_acjK b_acjL)
+ Control.Effect.Class.Coroutine: type CoroutineS a_acjZ b_ack0 = LiftIns (CoroutineI a_acjZ b_ack0)
- Control.Effect.Class.Except: [Catch] :: forall e_abW0 f_abW1 a_abW2. () => f_abW1 a_abW2 -> e_abW0 -> f_abW1 a_abW2 -> CatchS e_abW0 f_abW1 a_abW2
+ Control.Effect.Class.Except: [Catch] :: forall e_abWf f_abWg a_abWh. () => f_abWg a_abWh -> e_abWf -> f_abWg a_abWh -> CatchS e_abWf f_abWg a_abWh
- Control.Effect.Class.Except: [Throw] :: forall e_abW3 a_abW5. () => e_abW3 -> ThrowI e_abW3 a_abW5
+ Control.Effect.Class.Except: [Throw] :: forall e_abWi a_abWk. () => e_abWi -> ThrowI e_abWi a_abWk
- Control.Effect.Class.Except: data CatchS (e_abW0 :: Type) f_abW1 (a_abXC :: Type)
+ Control.Effect.Class.Except: data CatchS (e_abWf :: Type) f_abWg (a_abXR :: Type)
- Control.Effect.Class.Except: data ThrowI (e_abW3 :: Type) (a_abXy :: Type)
+ Control.Effect.Class.Except: data ThrowI (e_abWi :: Type) (a_abXN :: Type)
- Control.Effect.Class.Except: type ThrowS e_abW3 = LiftIns (ThrowI e_abW3)
+ Control.Effect.Class.Except: type ThrowS e_abWi = LiftIns (ThrowI e_abWi)
- Control.Effect.Class.Input: [Input] :: forall i_abNu. () => InputI i_abNu i_abNu
+ Control.Effect.Class.Input: [Input] :: forall i_abNJ. () => InputI i_abNJ i_abNJ
- Control.Effect.Class.Input: data InputI (i_abNu :: Type) (a_abO3 :: Type)
+ Control.Effect.Class.Input: data InputI (i_abNJ :: Type) (a_abOi :: Type)
- Control.Effect.Class.Input: pattern InputS :: () => a_6989586621679055180 ~ i_abNu => LiftIns (InputI i_abNu) f_abNv a_6989586621679055180
+ Control.Effect.Class.Input: pattern InputS :: () => a_6989586621679055195 ~ i_abNJ => LiftIns (InputI i_abNJ) f_abNK a_6989586621679055195
- Control.Effect.Class.Input: type InputS i_abNu = LiftIns (InputI i_abNu)
+ Control.Effect.Class.Input: type InputS i_abNJ = LiftIns (InputI i_abNJ)
- Control.Effect.Class.Output: [Output] :: forall o_abDu. () => o_abDu -> OutputI o_abDu ()
+ Control.Effect.Class.Output: [Output] :: forall o_abDJ. () => o_abDJ -> OutputI o_abDJ ()
- Control.Effect.Class.Output: data OutputI (o_abDu :: Type) (a_abE7 :: Type)
+ Control.Effect.Class.Output: data OutputI (o_abDJ :: Type) (a_abEm :: Type)
- Control.Effect.Class.Output: type OutputS o_abDu = LiftIns (OutputI o_abDu)
+ Control.Effect.Class.Output: type OutputS o_abDJ = LiftIns (OutputI o_abDJ)
- Control.Effect.Class.Provider: [Provide] :: forall c_abln e_ablo i_ablp g_ablq f_ablr a_abls. () => i_ablp -> forall (h_ablt :: Type -> Type). (c_abln h_ablt, e_ablo h_ablt) => (~>) f_ablr h_ablt -> h_ablt a_abls -> ProviderS c_abln e_ablo i_ablp g_ablq f_ablr (g_ablq a_abls)
+ Control.Effect.Class.Provider: [Provide] :: forall c_ablC e_ablD i_ablE g_ablF f_ablG a_ablH. () => i_ablE -> forall (h_ablI :: Type -> Type). (c_ablC h_ablI, e_ablD h_ablI) => (~>) f_ablG h_ablI -> h_ablI a_ablH -> ProviderS c_ablC e_ablD i_ablE g_ablF f_ablG (g_ablF a_ablH)
- Control.Effect.Class.Provider: data ProviderS (c_abln :: (Type -> Type) -> Constraint) (e_ablo :: (Type -> Type) -> Constraint) (i_ablp :: Type) (g_ablq :: Type -> Type) f_ablr (a_abn6 :: Type)
+ Control.Effect.Class.Provider: data ProviderS (c_ablC :: (Type -> Type) -> Constraint) (e_ablD :: (Type -> Type) -> Constraint) (i_ablE :: Type) (g_ablF :: Type -> Type) f_ablG (a_abnl :: Type)
- Control.Effect.Class.Reader: [Ask] :: forall r_aaY0. () => AskI r_aaY0 r_aaY0
+ Control.Effect.Class.Reader: [Ask] :: forall r_aaY5. () => AskI r_aaY5 r_aaY5
- Control.Effect.Class.Reader: [Local] :: forall r_aaXX f_aaXY a_aaXZ. () => r_aaXX -> r_aaXX -> f_aaXY a_aaXZ -> LocalS r_aaXX f_aaXY a_aaXZ
+ Control.Effect.Class.Reader: [Local] :: forall r_aaY2 f_aaY3 a_aaY4. () => r_aaY2 -> r_aaY2 -> f_aaY3 a_aaY4 -> LocalS r_aaY2 f_aaY3 a_aaY4
- Control.Effect.Class.Reader: data AskI (r_aaY0 :: Type) (a_aaZn :: Type)
+ Control.Effect.Class.Reader: data AskI (r_aaY5 :: Type) (a_aaZs :: Type)
- Control.Effect.Class.Reader: data LocalS (r_aaXX :: Type) f_aaXY (a_aaZp :: Type)
+ Control.Effect.Class.Reader: data LocalS (r_aaY2 :: Type) f_aaY3 (a_aaZu :: Type)
- Control.Effect.Class.Reader: pattern AskS :: () => a_6989586621679052038 ~ r_aaY0 => LiftIns (AskI r_aaY0) f_aaY1 a_6989586621679052038
+ Control.Effect.Class.Reader: pattern AskS :: () => a_6989586621679052043 ~ r_aaY5 => LiftIns (AskI r_aaY5) f_aaY6 a_6989586621679052043
- Control.Effect.Class.Reader: type AskS r_aaY0 = LiftIns (AskI r_aaY0)
+ Control.Effect.Class.Reader: type AskS r_aaY5 = LiftIns (AskI r_aaY5)
- Control.Effect.Class.State: [Get] :: forall s_aaAP. () => StateI s_aaAP s_aaAP
+ Control.Effect.Class.State: [Get] :: forall s_aaAU. () => StateI s_aaAU s_aaAU
- Control.Effect.Class.State: [Put] :: forall s_aaAP. () => s_aaAP -> StateI s_aaAP ()
+ Control.Effect.Class.State: [Put] :: forall s_aaAU. () => s_aaAU -> StateI s_aaAU ()
- Control.Effect.Class.State: data StateI (s_aaAP :: Type) (a_aaBC :: Type)
+ Control.Effect.Class.State: data StateI (s_aaAU :: Type) (a_aaBH :: Type)
- Control.Effect.Class.State: pattern GetS :: () => a_6989586621679050565 ~ s_aaAP => LiftIns (StateI s_aaAP) f_aaAQ a_6989586621679050565
+ Control.Effect.Class.State: pattern GetS :: () => a_6989586621679050570 ~ s_aaAU => LiftIns (StateI s_aaAU) f_aaAV a_6989586621679050570
- Control.Effect.Class.State: type StateS s_aaAP = LiftIns (StateI s_aaAP)
+ Control.Effect.Class.State: type StateS s_aaAU = LiftIns (StateI s_aaAU)
- Control.Effect.Class.Writer: [Censor] :: forall w_a9KO f_a9KP a_a9KR. () => w_a9KO -> w_a9KO -> f_a9KP a_a9KR -> WriterS w_a9KO f_a9KP a_a9KR
+ Control.Effect.Class.Writer: [Censor] :: forall w_a9JI f_a9JJ a_a9JL. () => w_a9JI -> w_a9JI -> f_a9JJ a_a9JL -> WriterS w_a9JI f_a9JJ a_a9JL
- Control.Effect.Class.Writer: [Listen] :: forall w_a9KO f_a9KP a_a9KQ. () => f_a9KP a_a9KQ -> WriterS w_a9KO f_a9KP (a_a9KQ, w_a9KO)
+ Control.Effect.Class.Writer: [Listen] :: forall w_a9JI f_a9JJ a_a9JK. () => f_a9JJ a_a9JK -> WriterS w_a9JI f_a9JJ (a_a9JK, w_a9JI)
- Control.Effect.Class.Writer: [Tell] :: forall w_a9KS. () => w_a9KS -> TellI w_a9KS ()
+ Control.Effect.Class.Writer: [Tell] :: forall w_a9JM. () => w_a9JM -> TellI w_a9JM ()
- Control.Effect.Class.Writer: data TellI (w_a9KS :: Type) (a_a9V0 :: Type)
+ Control.Effect.Class.Writer: data TellI (w_a9JM :: Type) (a_a9TU :: Type)
- Control.Effect.Class.Writer: data WriterS (w_a9KO :: Type) f_a9KP (a_a9V4 :: Type)
+ Control.Effect.Class.Writer: data WriterS (w_a9JI :: Type) f_a9JJ (a_a9TY :: Type)
- Control.Effect.Class.Writer: type TellS w_a9KS = LiftIns (TellI w_a9KS)
+ Control.Effect.Class.Writer: type TellS w_a9JM = LiftIns (TellI w_a9JM)
Files
- README.md +29/−2
- classy-effects.cabal +8/−3
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.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: classy-effects-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.@@ -11,15 +11,20 @@ the definition of effects in Haskell in a backend-library-agnostic manner. It also includes several standard effect definitions defined in compliance with CEPs, and Template Haskell functions to automatically make type classes conform to CEPs as effect classes.-+ . Please refer to [CEPs](https://github.com/sayo-hs/classy-effects/blob/master/CEPs/README.md) for details.-+ . The Template Haskell functions are re-exported from the [classy-effects-th](https://hackage.haskell.org/package/classy-effects-th) package, while the fundamental definitions are re-exported from the [classy-effects-base](https://hackage.haskell.org/package/classy-effects-base) package.+ .+ __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