in-other-words 0.2.1.0 → 0.2.1.1
raw patch · 23 files changed
+65/−39 lines, 23 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Control.Effect.Internal.Utils: type Type = Type
- Control.Effect: class (RepresentationalEff e, Carrier m) => Handler (h :: *) e m
+ Control.Effect: class (RepresentationalEff e, Carrier m) => Handler (h :: Type) e m
- Control.Effect: data InterpretC (h :: *) (e :: Effect) (m :: * -> *) a
+ Control.Effect: data InterpretC (h :: Type) (e :: Effect) (m :: Type -> Type) a
- Control.Effect: data InterpretSimpleC (e :: Effect) (m :: * -> *) a
+ Control.Effect: data InterpretSimpleC (e :: Effect) (m :: Type -> Type) a
- Control.Effect: data IntroC (top :: [Effect]) (new :: [Effect]) (m :: * -> *) a
+ Control.Effect: data IntroC (top :: [Effect]) (new :: [Effect]) (m :: Type -> Type) a
- Control.Effect: data ViaReifiedH (s :: *)
+ Control.Effect: data ViaReifiedH (s :: Type)
- Control.Effect: newtype Embed b (m :: * -> *) a
+ Control.Effect: newtype Embed b (m :: Type -> Type) a
- Control.Effect: type Effect = (* -> *) -> * -> *
+ Control.Effect: type Effect = (Type -> Type) -> Type -> Type
- Control.Effect.Alt: data Alt (m :: * -> *) a
+ Control.Effect.Alt: data Alt (m :: Type -> Type) a
- Control.Effect.Carrier.Internal.Compose: ComposeT :: t (u m) a -> ComposeT t (u :: (* -> *) -> * -> *) m a
+ Control.Effect.Carrier.Internal.Compose: ComposeT :: t (u m) a -> ComposeT t (u :: (Type -> Type) -> Type -> Type) m a
- Control.Effect.Carrier.Internal.Compose: [getComposeT] :: ComposeT t (u :: (* -> *) -> * -> *) m a -> t (u m) a
+ Control.Effect.Carrier.Internal.Compose: [getComposeT] :: ComposeT t (u :: (Type -> Type) -> Type -> Type) m a -> t (u m) a
- Control.Effect.Carrier.Internal.Compose: newtype ComposeT t (u :: (* -> *) -> * -> *) m a
+ Control.Effect.Carrier.Internal.Compose: newtype ComposeT t (u :: (Type -> Type) -> Type -> Type) m a
- Control.Effect.Carrier.Internal.Compose: type family CompositionBaseM (ts :: [(* -> *) -> * -> *]) (m :: * -> *)
+ Control.Effect.Carrier.Internal.Compose: type family CompositionBaseM (ts :: [(Type -> Type) -> Type -> Type]) (m :: Type -> Type)
- Control.Effect.Carrier.Internal.Interpret: HandlerC :: z a -> HandlerC (sHandler :: *) (sReform :: *) (r :: [Effect]) (p :: [Effect]) (m :: * -> *) z (a :: *)
+ Control.Effect.Carrier.Internal.Interpret: HandlerC :: z a -> HandlerC (sHandler :: Type) (sReform :: Type) (r :: [Effect]) (p :: [Effect]) (m :: Type -> Type) z (a :: Type)
- Control.Effect.Carrier.Internal.Interpret: InterpretC :: m a -> InterpretC (h :: *) (e :: Effect) (m :: * -> *) a
+ Control.Effect.Carrier.Internal.Interpret: InterpretC :: m a -> InterpretC (h :: Type) (e :: Effect) (m :: Type -> Type) a
- Control.Effect.Carrier.Internal.Interpret: InterpretPrimC :: m a -> InterpretPrimC (s :: *) (e :: Effect) (m :: * -> *) a
+ Control.Effect.Carrier.Internal.Interpret: InterpretPrimC :: m a -> InterpretPrimC (s :: Type) (e :: Effect) (m :: Type -> Type) a
- Control.Effect.Carrier.Internal.Interpret: InterpretPrimSimpleC :: ReaderT (ReifiedPrimHandler e m) m a -> InterpretPrimSimpleC (e :: Effect) (m :: * -> *) a
+ Control.Effect.Carrier.Internal.Interpret: InterpretPrimSimpleC :: ReaderT (ReifiedPrimHandler e m) m a -> InterpretPrimSimpleC (e :: Effect) (m :: Type -> Type) a
- Control.Effect.Carrier.Internal.Interpret: InterpretSimpleC :: ReaderT (ReifiedHandler e m) m a -> InterpretSimpleC (e :: Effect) (m :: * -> *) a
+ Control.Effect.Carrier.Internal.Interpret: InterpretSimpleC :: ReaderT (ReifiedHandler e m) m a -> InterpretSimpleC (e :: Effect) (m :: Type -> Type) a
- Control.Effect.Carrier.Internal.Interpret: [unHandlerC] :: HandlerC (sHandler :: *) (sReform :: *) (r :: [Effect]) (p :: [Effect]) (m :: * -> *) z (a :: *) -> z a
+ Control.Effect.Carrier.Internal.Interpret: [unHandlerC] :: HandlerC (sHandler :: Type) (sReform :: Type) (r :: [Effect]) (p :: [Effect]) (m :: Type -> Type) z (a :: Type) -> z a
- Control.Effect.Carrier.Internal.Interpret: [unInterpretC] :: InterpretC (h :: *) (e :: Effect) (m :: * -> *) a -> m a
+ Control.Effect.Carrier.Internal.Interpret: [unInterpretC] :: InterpretC (h :: Type) (e :: Effect) (m :: Type -> Type) a -> m a
- Control.Effect.Carrier.Internal.Interpret: [unInterpretPrimC] :: InterpretPrimC (s :: *) (e :: Effect) (m :: * -> *) a -> m a
+ Control.Effect.Carrier.Internal.Interpret: [unInterpretPrimC] :: InterpretPrimC (s :: Type) (e :: Effect) (m :: Type -> Type) a -> m a
- Control.Effect.Carrier.Internal.Interpret: [unInterpretPrimSimpleC] :: InterpretPrimSimpleC (e :: Effect) (m :: * -> *) a -> ReaderT (ReifiedPrimHandler e m) m a
+ Control.Effect.Carrier.Internal.Interpret: [unInterpretPrimSimpleC] :: InterpretPrimSimpleC (e :: Effect) (m :: Type -> Type) a -> ReaderT (ReifiedPrimHandler e m) m a
- Control.Effect.Carrier.Internal.Interpret: [unInterpretSimpleC] :: InterpretSimpleC (e :: Effect) (m :: * -> *) a -> ReaderT (ReifiedHandler e m) m a
+ Control.Effect.Carrier.Internal.Interpret: [unInterpretSimpleC] :: InterpretSimpleC (e :: Effect) (m :: Type -> Type) a -> ReaderT (ReifiedHandler e m) m a
- Control.Effect.Carrier.Internal.Interpret: class (RepresentationalEff e, Carrier m) => Handler (h :: *) e m
+ Control.Effect.Carrier.Internal.Interpret: class (RepresentationalEff e, Carrier m) => Handler (h :: Type) e m
- Control.Effect.Carrier.Internal.Interpret: class (RepresentationalEff e, Carrier m) => PrimHandler (h :: *) e m
+ Control.Effect.Carrier.Internal.Interpret: class (RepresentationalEff e, Carrier m) => PrimHandler (h :: Type) e m
- Control.Effect.Carrier.Internal.Interpret: data ViaReifiedH (s :: *)
+ Control.Effect.Carrier.Internal.Interpret: data ViaReifiedH (s :: Type)
- Control.Effect.Carrier.Internal.Interpret: newtype HandlerC (sHandler :: *) (sReform :: *) (r :: [Effect]) (p :: [Effect]) (m :: * -> *) z (a :: *)
+ Control.Effect.Carrier.Internal.Interpret: newtype HandlerC (sHandler :: Type) (sReform :: Type) (r :: [Effect]) (p :: [Effect]) (m :: Type -> Type) z (a :: Type)
- Control.Effect.Carrier.Internal.Interpret: newtype InterpretC (h :: *) (e :: Effect) (m :: * -> *) a
+ Control.Effect.Carrier.Internal.Interpret: newtype InterpretC (h :: Type) (e :: Effect) (m :: Type -> Type) a
- Control.Effect.Carrier.Internal.Interpret: newtype InterpretPrimC (s :: *) (e :: Effect) (m :: * -> *) a
+ Control.Effect.Carrier.Internal.Interpret: newtype InterpretPrimC (s :: Type) (e :: Effect) (m :: Type -> Type) a
- Control.Effect.Carrier.Internal.Interpret: newtype InterpretPrimSimpleC (e :: Effect) (m :: * -> *) a
+ Control.Effect.Carrier.Internal.Interpret: newtype InterpretPrimSimpleC (e :: Effect) (m :: Type -> Type) a
- Control.Effect.Carrier.Internal.Interpret: newtype InterpretSimpleC (e :: Effect) (m :: * -> *) a
+ Control.Effect.Carrier.Internal.Interpret: newtype InterpretSimpleC (e :: Effect) (m :: Type -> Type) a
- Control.Effect.Carrier.Internal.Intro: IntroC :: m a -> IntroC (top :: [Effect]) (new :: [Effect]) (m :: * -> *) a
+ Control.Effect.Carrier.Internal.Intro: IntroC :: m a -> IntroC (top :: [Effect]) (new :: [Effect]) (m :: Type -> Type) a
- Control.Effect.Carrier.Internal.Intro: [runIntroC] :: IntroC (top :: [Effect]) (new :: [Effect]) (m :: * -> *) a -> m a
+ Control.Effect.Carrier.Internal.Intro: [runIntroC] :: IntroC (top :: [Effect]) (new :: [Effect]) (m :: Type -> Type) a -> m a
- Control.Effect.Carrier.Internal.Intro: newtype IntroC (top :: [Effect]) (new :: [Effect]) (m :: * -> *) a
+ Control.Effect.Carrier.Internal.Intro: newtype IntroC (top :: [Effect]) (new :: [Effect]) (m :: Type -> Type) a
- Control.Effect.Debug: type family DebugEffects (m :: * -> *) :: k
+ Control.Effect.Debug: type family DebugEffects (m :: Type -> Type) :: k
- Control.Effect.Embed: newtype Embed b (m :: * -> *) a
+ Control.Effect.Embed: newtype Embed b (m :: Type -> Type) a
- Control.Effect.Error: newtype Throw e (m :: * -> *) (a :: *)
+ Control.Effect.Error: newtype Throw e (m :: Type -> Type) (a :: Type)
- Control.Effect.ErrorIO: data ErrorIO (m :: * -> *) a
+ Control.Effect.ErrorIO: data ErrorIO (m :: Type -> Type) a
- Control.Effect.Exceptional: data ExceptionallyC (eff :: Effect) (exc :: *) m a
+ Control.Effect.Exceptional: data ExceptionallyC (eff :: Effect) (exc :: Type) m a
- Control.Effect.Fail: newtype Fail (m :: * -> *) (a :: *)
+ Control.Effect.Fail: newtype Fail (m :: Type -> Type) (a :: Type)
- Control.Effect.Internal.Exceptional: ExceptionallyC :: m a -> ExceptionallyC (eff :: Effect) (exc :: *) m a
+ Control.Effect.Internal.Exceptional: ExceptionallyC :: m a -> ExceptionallyC (eff :: Effect) (exc :: Type) m a
- Control.Effect.Internal.Exceptional: [unExceptionallyC] :: ExceptionallyC (eff :: Effect) (exc :: *) m a -> m a
+ Control.Effect.Internal.Exceptional: [unExceptionallyC] :: ExceptionallyC (eff :: Effect) (exc :: Type) m a -> m a
- Control.Effect.Internal.Exceptional: newtype ExceptionallyC (eff :: Effect) (exc :: *) m a
+ Control.Effect.Internal.Exceptional: newtype ExceptionallyC (eff :: Effect) (exc :: Type) m a
- Control.Effect.Internal.Newtype: UnwrapC :: m a -> UnwrapC (e :: Effect) m (a :: *)
+ Control.Effect.Internal.Newtype: UnwrapC :: m a -> UnwrapC (e :: Effect) m (a :: Type)
- Control.Effect.Internal.Newtype: UnwrapTopC :: m a -> UnwrapTopC (e :: Effect) m (a :: *)
+ Control.Effect.Internal.Newtype: UnwrapTopC :: m a -> UnwrapTopC (e :: Effect) m (a :: Type)
- Control.Effect.Internal.Newtype: WrapC :: m a -> WrapC (e :: Effect) (e' :: Effect) m (a :: *)
+ Control.Effect.Internal.Newtype: WrapC :: m a -> WrapC (e :: Effect) (e' :: Effect) m (a :: Type)
- Control.Effect.Internal.Newtype: newtype UnwrapC (e :: Effect) m (a :: *)
+ Control.Effect.Internal.Newtype: newtype UnwrapC (e :: Effect) m (a :: Type)
- Control.Effect.Internal.Newtype: newtype UnwrapTopC (e :: Effect) m (a :: *)
+ Control.Effect.Internal.Newtype: newtype UnwrapTopC (e :: Effect) m (a :: Type)
- Control.Effect.Internal.Newtype: newtype WrapC (e :: Effect) (e' :: Effect) m (a :: *)
+ Control.Effect.Internal.Newtype: newtype WrapC (e :: Effect) (e' :: Effect) m (a :: Type)
- Control.Effect.Internal.Optional: type HoistOption (b :: * -> *) = Optional (HoistOptionCall b)
+ Control.Effect.Internal.Optional: type HoistOption (b :: Type -> Type) = Optional (HoistOptionCall b)
- Control.Effect.Internal.Reflection: reify :: forall a r. a -> (forall (s :: *) pr. (pr ~ Proxy, Reifies s a) => pr s -> r) -> r
+ Control.Effect.Internal.Reflection: reify :: forall a r. a -> (forall (s :: Type) pr. (pr ~ Proxy, Reifies s a) => pr s -> r) -> r
- Control.Effect.Internal.Reflection: reifyTagged :: forall a r. a -> (forall (s :: *). Reifies s a => Tagged s r) -> r
+ Control.Effect.Internal.Reflection: reifyTagged :: forall a r. a -> (forall (s :: Type). Reifies s a => Tagged s r) -> r
- Control.Effect.Internal.Regional: type Hoist (b :: * -> *) = Regional (HoistCall b)
+ Control.Effect.Internal.Regional: type Hoist (b :: Type -> Type) = Regional (HoistCall b)
- Control.Effect.Internal.Union: type Effect = (* -> *) -> * -> *
+ Control.Effect.Internal.Union: type Effect = (Type -> Type) -> Type -> Type
- Control.Effect.Internal.ViaAlg: ViaAlg :: m a -> ViaAlg (s :: *) (e :: Effect) m a
+ Control.Effect.Internal.ViaAlg: ViaAlg :: m a -> ViaAlg (s :: Type) (e :: Effect) m a
- Control.Effect.Internal.ViaAlg: [unViaAlg] :: ViaAlg (s :: *) (e :: Effect) m a -> m a
+ Control.Effect.Internal.ViaAlg: [unViaAlg] :: ViaAlg (s :: Type) (e :: Effect) m a -> m a
- Control.Effect.Internal.ViaAlg: newtype ViaAlg (s :: *) (e :: Effect) m a
+ Control.Effect.Internal.ViaAlg: newtype ViaAlg (s :: Type) (e :: Effect) m a
- Control.Effect.Newtype: data UnwrapC (e :: Effect) m (a :: *)
+ Control.Effect.Newtype: data UnwrapC (e :: Effect) m (a :: Type)
- Control.Effect.Newtype: data UnwrapTopC (e :: Effect) m (a :: *)
+ Control.Effect.Newtype: data UnwrapTopC (e :: Effect) m (a :: Type)
- Control.Effect.Newtype: data WrapC (e :: Effect) (e' :: Effect) m (a :: *)
+ Control.Effect.Newtype: data WrapC (e :: Effect) (e' :: Effect) m (a :: Type)
- Control.Effect.Optional: type HoistOption (b :: * -> *) = Optional (HoistOptionCall b)
+ Control.Effect.Optional: type HoistOption (b :: Type -> Type) = Optional (HoistOptionCall b)
- Control.Effect.Primitive: class (RepresentationalEff e, Carrier m) => PrimHandler (h :: *) e m
+ Control.Effect.Primitive: class (RepresentationalEff e, Carrier m) => PrimHandler (h :: Type) e m
- Control.Effect.Primitive: data InterpretPrimC (s :: *) (e :: Effect) (m :: * -> *) a
+ Control.Effect.Primitive: data InterpretPrimC (s :: Type) (e :: Effect) (m :: Type -> Type) a
- Control.Effect.Primitive: data InterpretPrimSimpleC (e :: Effect) (m :: * -> *) a
+ Control.Effect.Primitive: data InterpretPrimSimpleC (e :: Effect) (m :: Type -> Type) a
- Control.Effect.Regional: type Hoist (b :: * -> *) = Regional (HoistCall b)
+ Control.Effect.Regional: type Hoist (b :: Type -> Type) = Regional (HoistCall b)
- Control.Effect.Type.Alt: data Alt (m :: * -> *) a
+ Control.Effect.Type.Alt: data Alt (m :: Type -> Type) a
- Control.Effect.Type.Embed: newtype Embed b (m :: * -> *) a
+ Control.Effect.Type.Embed: newtype Embed b (m :: Type -> Type) a
- Control.Effect.Type.ErrorIO: data ErrorIO (m :: * -> *) a
+ Control.Effect.Type.ErrorIO: data ErrorIO (m :: Type -> Type) a
- Control.Effect.Type.Fail: newtype Fail (m :: * -> *) (a :: *)
+ Control.Effect.Type.Fail: newtype Fail (m :: Type -> Type) (a :: Type)
- Control.Effect.Type.Throw: newtype Throw e (m :: * -> *) (a :: *)
+ Control.Effect.Type.Throw: newtype Throw e (m :: Type -> Type) (a :: Type)
- Control.Monad.Trans.Free.Church.Alternate: FreeT :: (forall r. (forall x. f x -> (x -> m r) -> m r) -> (a -> m r) -> m r) -> FreeT f (m :: * -> *) a
+ Control.Monad.Trans.Free.Church.Alternate: FreeT :: (forall r. (forall x. f x -> (x -> m r) -> m r) -> (a -> m r) -> m r) -> FreeT f (m :: Type -> Type) a
- Control.Monad.Trans.Free.Church.Alternate: [unFreeT] :: FreeT f (m :: * -> *) a -> forall r. (forall x. f x -> (x -> m r) -> m r) -> (a -> m r) -> m r
+ Control.Monad.Trans.Free.Church.Alternate: [unFreeT] :: FreeT f (m :: Type -> Type) a -> forall r. (forall x. f x -> (x -> m r) -> m r) -> (a -> m r) -> m r
- Control.Monad.Trans.Free.Church.Alternate: newtype FreeT f (m :: * -> *) a
+ Control.Monad.Trans.Free.Church.Alternate: newtype FreeT f (m :: Type -> Type) a
- Control.Monad.Trans.List.Church: ListT :: (forall r. (a -> m r -> m r) -> m r -> m r -> m r) -> ListT (m :: * -> *) a
+ Control.Monad.Trans.List.Church: ListT :: (forall r. (a -> m r -> m r) -> m r -> m r -> m r) -> ListT (m :: Type -> Type) a
- Control.Monad.Trans.List.Church: [unListT] :: ListT (m :: * -> *) a -> forall r. (a -> m r -> m r) -> m r -> m r -> m r
+ Control.Monad.Trans.List.Church: [unListT] :: ListT (m :: Type -> Type) a -> forall r. (a -> m r -> m r) -> m r -> m r -> m r
- Control.Monad.Trans.List.Church: newtype ListT (m :: * -> *) a
+ Control.Monad.Trans.List.Church: newtype ListT (m :: Type -> Type) a
Files
- CHANGELOG.md +4/−0
- README.md +2/−1
- in-other-words.cabal +3/−3
- src/Control/Effect/Carrier/Internal/Compose.hs +3/−3
- src/Control/Effect/Carrier/Internal/Interpret.hs +10/−10
- src/Control/Effect/Carrier/Internal/Intro.hs +1/−1
- src/Control/Effect/Debug.hs +2/−1
- src/Control/Effect/Internal.hs +1/−1
- src/Control/Effect/Internal/Exceptional.hs +1/−1
- src/Control/Effect/Internal/Newtype.hs +3/−3
- src/Control/Effect/Internal/Optional.hs +2/−1
- src/Control/Effect/Internal/Reflection.hs +3/−2
- src/Control/Effect/Internal/Regional.hs +3/−1
- src/Control/Effect/Internal/Union.hs +1/−1
- src/Control/Effect/Internal/Utils.hs +5/−1
- src/Control/Effect/Internal/ViaAlg.hs +3/−2
- src/Control/Effect/Type/Alt.hs +3/−1
- src/Control/Effect/Type/Embed.hs +3/−1
- src/Control/Effect/Type/ErrorIO.hs +2/−1
- src/Control/Effect/Type/Fail.hs +3/−1
- src/Control/Effect/Type/Throw.hs +3/−1
- src/Control/Monad/Trans/Free/Church/Alternate.hs +1/−1
- src/Control/Monad/Trans/List/Church.hs +3/−1
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Changelog for `in-other-words` +## 0.2.1.1 (2022-06-15)+### Non-breaking Changes+* GHC 9.2.3 compatiblity+ ## 0.2.1.0 (2021-11-05) ### Non-breaking Changes * Added `hoistSteps`
README.md view
@@ -3,7 +3,8 @@ [](https://github.com/KingoftheHomeless/in-other-words/actions?query=workflow%3A%22build+GHC+8.6%22) [](https://github.com/KingoftheHomeless/in-other-words/actions?query=workflow%3A%22build+GHC+8.8%22) [](https://github.com/KingoftheHomeless/in-other-words/actions?query=workflow%3A%22build+GHC+8.10%22)-[](https://github.com/KingoftheHomeless/in-other-words/actions?query=workflow%3A%22build+GHC+9.0.1%22)+[](https://github.com/KingoftheHomeless/in-other-words/actions?query=workflow%3A%22build+GHC+9.0.2%22)+[](https://github.com/KingoftheHomeless/in-other-words/actions?query=workflow%3A%22build+GHC+9.2.3%22) - [Overview][] - [Features][]
in-other-words.cabal view
@@ -4,16 +4,16 @@ -- -- see: https://github.com/sol/hpack ----- hash: 63c053f88fc44761f95d97eedcd3be8a6130b0202778be539bab361549d74523+-- hash: cb8b99f7f5a97bd2225716b40c6c61d182c84c8f61b047561eff935b7da2e482 name: in-other-words-version: 0.2.1.0+version: 0.2.1.1 synopsis: A higher-order effect system where the sky's the limit description: A low-boilerplate effect system with easy higher-order effects and very high expressive power category: Control homepage: https://github.com/KingoftheHomeless/in-other-words#readme author: Love Waern-maintainer: combiner8761@gmail.com+maintainer: love.waern@gmail.com copyright: BSD3 license: BSD3 license-file: LICENSE
src/Control/Effect/Carrier/Internal/Compose.hs view
@@ -16,7 +16,7 @@ import Unsafe.Coerce -- | Composition of monad/carrier transformers.-newtype ComposeT t (u :: (* -> *) -> * -> *) m a = ComposeT {+newtype ComposeT t (u :: (Type -> Type) -> Type -> Type) m a = ComposeT { getComposeT :: t (u m) a } deriving ( Functor, Applicative, Monad@@ -135,13 +135,13 @@ -- such as InterpretSimpleC. -- -- So only with a left fold can we guarantee that the unsafeCoerce in runComposition is safe.-type family CompositionBaseT' acc ts :: (* -> *) -> * -> * where+type family CompositionBaseT' acc ts :: (Type -> Type) -> Type -> Type where CompositionBaseT' acc '[] = acc CompositionBaseT' acc (t ': ts) = CompositionBaseT' (ComposeT acc t) ts type CompositionBaseT ts = CompositionBaseT' IdentityT ts -type family CompositionBaseM (ts :: [(* -> *) -> * -> *]) (m :: * -> *) where+type family CompositionBaseM (ts :: [(Type -> Type) -> Type -> Type]) (m :: Type -> Type) where CompositionBaseM '[] m = m CompositionBaseM (t ': ts) m = t (CompositionBaseM ts m)
src/Control/Effect/Carrier/Internal/Interpret.hs view
@@ -32,11 +32,11 @@ newtype HandlerC- (sHandler :: *)- (sReform :: *)+ (sHandler :: Type)+ (sReform :: Type) (r :: [Effect]) (p :: [Effect])- (m :: * -> *) z (a :: *)+ (m :: Type -> Type) z (a :: Type) = HandlerC { unHandlerC :: z a } deriving (Functor, Applicative, Monad) via z @@ -94,7 +94,7 @@ HandlerC (n m) {-# INLINE liftBase #-} -newtype InterpretPrimC (s :: *) (e :: Effect) (m :: * -> *) a =+newtype InterpretPrimC (s :: Type) (e :: Effect) (m :: Type -> Type) a = InterpretPrimC { unInterpretPrimC :: m a }@@ -125,7 +125,7 @@ class ( RepresentationalEff e , Carrier m )- => Handler (h :: *) e m where+ => Handler (h :: Type) e m where effHandler :: EffHandler e m @@ -204,7 +204,7 @@ -- See 'EffPrimHandler'. class ( RepresentationalEff e , Carrier m- ) => PrimHandler (h :: *) e m where+ ) => PrimHandler (h :: Type) e m where effPrimHandler :: EffPrimHandler e m instance ( Carrier m@@ -229,7 +229,7 @@ InterpretC $ unItself $ runEffly $ effHandler @h @e (coerce e) {-# INLINEABLE algDerivs #-} -newtype InterpretC (h :: *) (e :: Effect) (m :: * -> *) a = InterpretC {+newtype InterpretC (h :: Type) (e :: Effect) (m :: Type -> Type) a = InterpretC { unInterpretC :: m a } deriving ( Functor, Applicative, Monad@@ -275,7 +275,7 @@ (coerceHandler (effPrimHandler @h @e @m)) {-# INLINEABLE algDerivs #-} -data ViaReifiedH (s :: *)+data ViaReifiedH (s :: Type) instance ( RepresentationalEff e , Carrier m@@ -303,7 +303,7 @@ . ReifiesPrimHandler s e m => InterpretPrimC (ViaReifiedH s) e m a -newtype InterpretSimpleC (e :: Effect) (m :: * -> *) a = InterpretSimpleC {+newtype InterpretSimpleC (e :: Effect) (m :: Type -> Type) a = InterpretSimpleC { unInterpretSimpleC :: ReaderT (ReifiedHandler e m) m a } deriving ( Functor, Applicative, Monad@@ -337,7 +337,7 @@ handler (coerce e) {-# INLINEABLE reformulate #-} -newtype InterpretPrimSimpleC (e :: Effect) (m :: * -> *) a =+newtype InterpretPrimSimpleC (e :: Effect) (m :: Type -> Type) a = InterpretPrimSimpleC { unInterpretPrimSimpleC :: ReaderT (ReifiedPrimHandler e m) m a }
src/Control/Effect/Carrier/Internal/Intro.hs view
@@ -18,7 +18,7 @@ newtype IntroC (top :: [Effect]) (new :: [Effect])- (m :: * -> *)+ (m :: Type -> Type) a = IntroC { runIntroC :: m a } deriving ( Functor, Applicative, Monad
src/Control/Effect/Debug.hs view
@@ -2,11 +2,12 @@ module Control.Effect.Debug where import Control.Effect.Carrier +import Data.Kind (Type) import GHC.TypeLits -- Type family needed to delay the TypeError until when 'debugEffects' -- is used. -type family DebugEffects (m :: * -> *) :: k where +type family DebugEffects (m :: Type -> Type) :: k where DebugEffects m = TypeError ( 'Text "Control.Effect.Debug.debugEffects" ':$$: 'Text "Derivs: " ':<>: 'ShowType (Derivs m) ':$$: 'Text "Prims: " ':<>: 'ShowType (Prims m)
src/Control/Effect/Internal.hs view
@@ -142,7 +142,7 @@ send = algDerivs . inj {-# INLINE send #-} -deriving via (m :: * -> *) instance Carrier m => Carrier (IdentityT m)+deriving via (m :: Type -> Type) instance Carrier m => Carrier (IdentityT m) -- | A constraint that @'Prims' m@ satisfies all the constraints in the list -- @cs@.
src/Control/Effect/Internal/Exceptional.hs view
@@ -71,7 +71,7 @@ which is just noise in this case. -} -newtype ExceptionallyC (eff :: Effect) (exc :: *) m a = ExceptionallyC { +newtype ExceptionallyC (eff :: Effect) (exc :: Type) m a = ExceptionallyC { unExceptionallyC :: m a } deriving ( Functor, Applicative, Monad
src/Control/Effect/Internal/Newtype.hs view
@@ -27,7 +27,7 @@ newtype WrapC (e :: Effect) (e' :: Effect) m- (a :: *) = WrapC { unWrapC :: m a }+ (a :: Type) = WrapC { unWrapC :: m a } deriving ( Functor, Applicative, Monad , Alternative, MonadPlus , MonadFix, MonadFail, MonadIO@@ -89,7 +89,7 @@ newtype UnwrapC (e :: Effect) m- (a :: *) = UnwrapC { unUnwrapC :: m a }+ (a :: Type) = UnwrapC { unUnwrapC :: m a } deriving ( Functor, Applicative, Monad , Alternative, MonadPlus , MonadFix, MonadFail, MonadIO@@ -119,7 +119,7 @@ newtype UnwrapTopC (e :: Effect) m- (a :: *) = UnwrapTopC { unUnwrapTopC :: m a }+ (a :: Type) = UnwrapTopC { unUnwrapTopC :: m a } deriving ( Functor, Applicative, Monad , Alternative, MonadPlus , MonadFix, MonadFail, MonadIO
src/Control/Effect/Internal/Optional.hs view
@@ -12,6 +12,7 @@ import Control.Effect.Type.Optional +import Data.Kind (Type) newtype HoistOptionCall b a = HoistOptionCall (forall x. (a -> x) -> b x -> b x) deriving (Functor)@@ -19,7 +20,7 @@ -- | A useful specialization of 'Optional' where the functor is -- @'HoistOptionCall' b@. From this, you can derive -- 'Control.Effect.Optional.hoistOption'.-type HoistOption (b :: * -> *) = Optional (HoistOptionCall b)+type HoistOption (b :: Type -> Type) = Optional (HoistOptionCall b) data HoistOptionH
src/Control/Effect/Internal/Reflection.hs view
@@ -8,6 +8,7 @@ ) where import Unsafe.Coerce +import Data.Kind (Type) import Data.Proxy newtype Tagged s a = Tagged { getTagged :: a } @@ -24,10 +25,10 @@ newtype Magic a r = Magic (Reifies Skolem a => Tagged Skolem r) -reifyTagged :: forall a r. a -> (forall (s :: *). Reifies s a => Tagged s r) -> r +reifyTagged :: forall a r. a -> (forall (s :: Type). Reifies s a => Tagged s r) -> r reifyTagged a k = unsafeCoerce (Magic k :: Magic a r) a {-# INLINE reifyTagged #-} -reify :: forall a r. a -> (forall (s :: *) pr. (pr ~ Proxy, Reifies s a) => pr s -> r) -> r +reify :: forall a r. a -> (forall (s :: Type) pr. (pr ~ Proxy, Reifies s a) => pr s -> r) -> r reify a k = reifyTagged a (unproxy k) {-# INLINE reify #-}
src/Control/Effect/Internal/Regional.hs view
@@ -11,12 +11,14 @@ import Control.Monad.Trans.Control +import Data.Kind (Type)+ newtype HoistCall b = HoistCall (forall x. b x -> b x) -- | A useful specialization of 'Regional' where the -- constant type is @'HoistCall' b@. From this, -- you can derive 'Control.Effect.Regional.hoist'.-type Hoist (b :: * -> *) = Regional (HoistCall b)+type Hoist (b :: Type -> Type) = Regional (HoistCall b) data HoistH
src/Control/Effect/Internal/Union.hs view
@@ -21,7 +21,7 @@ -- Output :: o -> InOut i o m () -- @ ---type Effect = (* -> *) -> * -> *+type Effect = (Type -> Type) -> Type -> Type -- | An effect for collecting multiple effects into one effect. --
src/Control/Effect/Internal/Utils.hs view
@@ -1,6 +1,10 @@-module Control.Effect.Internal.Utils where +module Control.Effect.Internal.Utils + ( Type, + module Control.Effect.Internal.Utils + ) where import Data.Coerce +import Data.Kind (Type) infixr 9 #. (#.) :: Coercible c b => (b -> c) -> (a -> b) -> (a -> c)
src/Control/Effect/Internal/ViaAlg.hs view
@@ -1,11 +1,12 @@ module Control.Effect.Internal.ViaAlg where -import Data.Coerce import Control.Effect.Internal.Union +import Data.Coerce +import Data.Kind (Type) type RepresentationalT = RepresentationalEff -newtype ViaAlg (s :: *) (e :: Effect) m a = ViaAlg { +newtype ViaAlg (s :: Type) (e :: Effect) m a = ViaAlg { unViaAlg :: m a } deriving (Functor, Applicative, Monad)
src/Control/Effect/Type/Alt.hs view
@@ -1,6 +1,8 @@ {-# OPTIONS_HADDOCK not-home #-} module Control.Effect.Type.Alt where +import Data.Kind (Type)+ -- | An effect corresponding to the -- 'Control.Applicative.Alternative' type class. --@@ -14,6 +16,6 @@ -- how it interprets 'Alt'. This means you can use -- an 'Alt' interpreter to locally gain access to an 'Control.Applicative.Alternative' -- instance inside of application code.-data Alt (m :: * -> *) a where+data Alt (m :: Type -> Type) a where Empty :: Alt m a Alt :: m a -> m a -> Alt m a
src/Control/Effect/Type/Embed.hs view
@@ -1,6 +1,8 @@ {-# OPTIONS_HADDOCK not-home #-} module Control.Effect.Type.Embed where +import Data.Kind (Type) + -- | An effect for embedding actions of a base monad into the current one. -newtype Embed b (m :: * -> *) a where +newtype Embed b (m :: Type -> Type) a where Embed :: { unEmbed :: b a } -> Embed b m a
src/Control/Effect/Type/ErrorIO.hs view
@@ -2,8 +2,9 @@ module Control.Effect.Type.ErrorIO where import Control.Exception +import Data.Kind (Type) -- | An effect for throwing and catching 'IO'-based exceptions. -data ErrorIO (m :: * -> *) a where +data ErrorIO (m :: Type -> Type) a where ThrowIO :: Exception e => e -> ErrorIO m a CatchIO :: Exception e => m a -> (e -> m a) -> ErrorIO m a
src/Control/Effect/Type/Fail.hs view
@@ -1,6 +1,8 @@ {-# OPTIONS_HADDOCK not-home #-} module Control.Effect.Type.Fail where +import Data.Kind (Type)+ -- | An effect corresponding to the 'Control.Monad.Fail.MonadFail' type class. -- -- 'Control.Effect.Effly''s 'Control.Monad.Fail.MonadFail' instance is based@@ -12,5 +14,5 @@ -- how it interprets 'Fail'. This means you can use -- an 'Fail' interpreter to locally gain access to an 'Control.Monad.Fail.MonadFail' -- instance inside of application code.-newtype Fail (m :: * -> *) (a :: *) where+newtype Fail (m :: Type -> Type) (a :: Type) where Fail :: String -> Fail m a
src/Control/Effect/Type/Throw.hs view
@@ -1,7 +1,9 @@ {-# OPTIONS_HADDOCK not-home #-} module Control.Effect.Type.Throw where +import Data.Kind (Type)+ -- | An effect for throwing exceptions of type @e@.-newtype Throw e (m :: * -> *) (a :: *) where+newtype Throw e (m :: Type -> Type) (a :: Type) where Throw :: e -> Throw e m a
src/Control/Monad/Trans/Free/Church/Alternate.hs view
@@ -14,7 +14,7 @@ import Control.Effect.Type.Optional import Control.Monad.Catch hiding (handle) -newtype FreeT f (m :: * -> *) a = FreeT {+newtype FreeT f (m :: Type -> Type) a = FreeT { unFreeT :: forall r . (forall x. f x -> (x -> m r) -> m r) -> (a -> m r) -> m r
src/Control/Monad/Trans/List/Church.hs view
@@ -7,6 +7,8 @@ import qualified Control.Monad.Catch as C import qualified Control.Monad.Fail as Fail +import Data.Kind (Type)+ import Control.Effect.Carrier import Control.Effect.Type.ListenPrim@@ -16,7 +18,7 @@ import Control.Effect.Type.Unravel import Control.Effect.Type.ReaderPrim -newtype ListT (m :: * -> *) a = ListT {+newtype ListT (m :: Type -> Type) a = ListT { unListT :: forall r . (a -> m r -> m r) -> m r -- lose