incipit-core 0.3.0.0 → 0.4.0.0
raw patch · 4 files changed
+95/−6 lines, 4 filesdep ~basedep ~incipit-basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, incipit-base
API changes (from Hackage documentation)
- IncipitCore: (.@) :: forall m (r :: [Effect]) (e :: Effect) z. Monad m => (forall x. () => Sem r x -> m x) -> (forall y. () => (forall x. () => Sem r x -> m x) -> Sem (e : r) y -> Sem r y) -> Sem (e : r) z -> m z
- IncipitCore: (.@@) :: forall m (r :: [Effect]) (e :: Effect) f z. Monad m => (forall x. () => Sem r x -> m x) -> (forall y. () => (forall x. () => Sem r x -> m x) -> Sem (e : r) y -> Sem r (f y)) -> Sem (e : r) z -> m (f z)
- IncipitCore: asyncToIO :: forall (r :: [(Type -> Type) -> Type -> Type]) a. Member (Embed IO) r => Sem (Async : r) a -> Sem r a
- IncipitCore: infixl 8 .@
- IncipitCore: lowerAsync :: forall (r :: [(Type -> Type) -> Type -> Type]) a. Member (Embed IO) r => (forall x. () => Sem r x -> IO x) -> Sem (Async : r) a -> Sem r a
- IncipitCore: lowerError :: forall e (r :: [(Type -> Type) -> Type -> Type]) a. (Typeable e, Member (Embed IO) r) => (forall x. () => Sem r x -> IO x) -> Sem ((Error e :: (Type -> Type) -> Type -> Type) : r) a -> Sem r (Either e a)
- IncipitCore: lowerResource :: forall (r :: [(Type -> Type) -> Type -> Type]) a. Member (Embed IO) r => (forall x. () => Sem r x -> IO x) -> Sem (Resource : r) a -> Sem r a
- IncipitCore: resourceToIO :: forall (r :: [(Type -> Type) -> Type -> Type]) a. Member (Embed IO) r => Sem (Resource : r) a -> Sem r a
- IncipitCore: type Member (e :: k) (r :: [k]) = MemberNoError e r
- IncipitCore: type MemberWithError (e :: Effect) (r :: [Effect]) = (MemberNoError e r, WhenStuck LocateEffect e r AmbiguousSend e r :: Constraint)
- IncipitCore: withLowerToIO :: forall (r :: [(Type -> Type) -> Type -> Type]) a. Member (Embed IO) r => ((forall x. () => Sem r x -> IO x) -> IO () -> IO a) -> Sem r a
+ IncipitCore: class Member (t :: Effect) (r :: EffectRow)
+ IncipitCore: evalAtomicStateViaState :: forall s (r :: [(Type -> Type) -> Type -> Type]) a. s -> Sem ((AtomicState s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
+ IncipitCore: execAtomicStateViaState :: forall s (r :: [(Type -> Type) -> Type -> Type]) a. s -> Sem ((AtomicState s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r s
+ IncipitCore: runAtomicStateViaState :: forall s (r :: [(Type -> Type) -> Type -> Type]) a. s -> Sem ((AtomicState s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r (s, a)
- IncipitCore: [Embed] :: forall (m :: Type -> Type) a (z :: Type -> Type). {unEmbed :: m a} -> Embed m z a
+ IncipitCore: [Embed] :: forall (m :: Type -> Type) a (z :: Type -> Type). m a -> Embed m z a
- IncipitCore: ask :: forall i (r :: [Effect]). MemberWithError (Reader i) r => Sem r i
+ IncipitCore: ask :: forall i (r :: EffectRow). Member (Reader i) r => Sem r i
- IncipitCore: asks :: forall i j (r :: [(Type -> Type) -> Type -> Type]). Member (Reader i) r => (i -> j) -> Sem r j
+ IncipitCore: asks :: forall i j (r :: EffectRow). Member (Reader i) r => (i -> j) -> Sem r j
- IncipitCore: async :: forall (r :: [Effect]) a. MemberWithError Async r => Sem r a -> Sem r (Async (Maybe a))
+ IncipitCore: async :: forall (r :: EffectRow) a. Member Async r => Sem r a -> Sem r (Async (Maybe a))
- IncipitCore: asyncToIOFinal :: forall (r :: [(Type -> Type) -> Type -> Type]) a. Member (Final IO) r => Sem (Async : r) a -> Sem r a
+ IncipitCore: asyncToIOFinal :: forall (r :: EffectRow) a. Member (Final IO) r => Sem (Async : r) a -> Sem r a
- IncipitCore: atomicGet :: forall s (r :: [(Type -> Type) -> Type -> Type]). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => Sem r s
+ IncipitCore: atomicGet :: forall s (r :: EffectRow). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => Sem r s
- IncipitCore: atomicGets :: forall s s' (r :: [(Type -> Type) -> Type -> Type]). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => (s -> s') -> Sem r s'
+ IncipitCore: atomicGets :: forall s s' (r :: EffectRow). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => (s -> s') -> Sem r s'
- IncipitCore: atomicModify :: forall s (r :: [(Type -> Type) -> Type -> Type]). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => (s -> s) -> Sem r ()
+ IncipitCore: atomicModify :: forall s (r :: EffectRow). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => (s -> s) -> Sem r ()
- IncipitCore: atomicModify' :: forall s (r :: [(Type -> Type) -> Type -> Type]). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => (s -> s) -> Sem r ()
+ IncipitCore: atomicModify' :: forall s (r :: EffectRow). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => (s -> s) -> Sem r ()
- IncipitCore: atomicPut :: forall s (r :: [(Type -> Type) -> Type -> Type]). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => s -> Sem r ()
+ IncipitCore: atomicPut :: forall s (r :: EffectRow). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => s -> Sem r ()
- IncipitCore: atomicState :: forall s a (r :: [(Type -> Type) -> Type -> Type]). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => (s -> (s, a)) -> Sem r a
+ IncipitCore: atomicState :: forall s a (r :: EffectRow). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => (s -> (s, a)) -> Sem r a
- IncipitCore: atomicState' :: forall s a (r :: [(Type -> Type) -> Type -> Type]). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => (s -> (s, a)) -> Sem r a
+ IncipitCore: atomicState' :: forall s a (r :: EffectRow). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => (s -> (s, a)) -> Sem r a
- IncipitCore: atomicStateToIO :: forall s (r :: [(Type -> Type) -> Type -> Type]) a. Member (Embed IO) r => s -> Sem ((AtomicState s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r (s, a)
+ IncipitCore: atomicStateToIO :: forall s (r :: EffectRow) a. Member (Embed IO) r => s -> Sem ((AtomicState s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r (s, a)
- IncipitCore: atomicStateToState :: forall s (r :: [(Type -> Type) -> Type -> Type]) a. Member (State s :: (Type -> Type) -> Type -> Type) r => Sem ((AtomicState s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
+ IncipitCore: atomicStateToState :: forall s (r :: EffectRow) a. Member (State s :: (Type -> Type) -> Type -> Type) r => Sem ((AtomicState s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
- IncipitCore: await :: forall (r :: [Effect]) a. MemberWithError Async r => Async a -> Sem r a
+ IncipitCore: await :: forall (r :: EffectRow) a. Member Async r => Async a -> Sem r a
- IncipitCore: bracket :: forall (r :: [Effect]) a c b. MemberWithError Resource r => Sem r a -> (a -> Sem r c) -> (a -> Sem r b) -> Sem r b
+ IncipitCore: bracket :: forall (r :: EffectRow) a c b. Member Resource r => Sem r a -> (a -> Sem r c) -> (a -> Sem r b) -> Sem r b
- IncipitCore: bracketOnError :: forall (r :: [Effect]) a c b. MemberWithError Resource r => Sem r a -> (a -> Sem r c) -> (a -> Sem r b) -> Sem r b
+ IncipitCore: bracketOnError :: forall (r :: EffectRow) a c b. Member Resource r => Sem r a -> (a -> Sem r c) -> (a -> Sem r b) -> Sem r b
- IncipitCore: bracket_ :: forall (r :: [(Type -> Type) -> Type -> Type]) a b c. Member Resource r => Sem r a -> Sem r b -> Sem r c -> Sem r c
+ IncipitCore: bracket_ :: forall (r :: EffectRow) a b c. Member Resource r => Sem r a -> Sem r b -> Sem r c -> Sem r c
- IncipitCore: cancel :: forall (r :: [Effect]) a. MemberWithError Async r => Async a -> Sem r ()
+ IncipitCore: cancel :: forall (r :: EffectRow) a. Member Async r => Async a -> Sem r ()
- IncipitCore: catch :: forall e (r :: [Effect]) a. MemberWithError (Error e :: (Type -> Type) -> Type -> Type) r => Sem r a -> (e -> Sem r a) -> Sem r a
+ IncipitCore: catch :: forall e (r :: EffectRow) a. Member (Error e :: (Type -> Type) -> Type -> Type) r => Sem r a -> (e -> Sem r a) -> Sem r a
- IncipitCore: catchJust :: forall e (r :: [(Type -> Type) -> Type -> Type]) b a. Member (Error e :: (Type -> Type) -> Type -> Type) r => (e -> Maybe b) -> Sem r a -> (b -> Sem r a) -> Sem r a
+ IncipitCore: catchJust :: forall e (r :: EffectRow) b a. Member (Error e :: (Type -> Type) -> Type -> Type) r => (e -> Maybe b) -> Sem r a -> (b -> Sem r a) -> Sem r a
- IncipitCore: censor :: forall o (r :: [(Type -> Type) -> Type -> Type]) a. Member (Writer o) r => (o -> o) -> Sem r a -> Sem r a
+ IncipitCore: censor :: forall o (r :: EffectRow) a. Member (Writer o) r => (o -> o) -> Sem r a -> Sem r a
- IncipitCore: embed :: forall m (r :: [(Type -> Type) -> Type -> Type]) a. Member (Embed m) r => m a -> Sem r a
+ IncipitCore: embed :: forall m (r :: EffectRow) a. Member (Embed m) r => m a -> Sem r a
- IncipitCore: embedFinal :: forall m (r :: [(Type -> Type) -> Type -> Type]) a. (Member (Final m) r, Functor m) => m a -> Sem r a
+ IncipitCore: embedFinal :: forall m (r :: EffectRow) a. (Member (Final m) r, Functor m) => m a -> Sem r a
- IncipitCore: embedToFinal :: forall (m :: Type -> Type) (r :: [(Type -> Type) -> Type -> Type]) a. (Member (Final m) r, Functor m) => Sem (Embed m : r) a -> Sem r a
+ IncipitCore: embedToFinal :: forall (m :: Type -> Type) (r :: EffectRow) a. (Member (Final m) r, Functor m) => Sem (Embed m : r) a -> Sem r a
- IncipitCore: errorToIOFinal :: forall e (r :: [(Type -> Type) -> Type -> Type]) a. (Typeable e, Member (Final IO) r) => Sem ((Error e :: (Type -> Type) -> Type -> Type) : r) a -> Sem r (Either e a)
+ IncipitCore: errorToIOFinal :: forall e (r :: EffectRow) a. Member (Final IO) r => Sem ((Error e :: (Type -> Type) -> Type -> Type) : r) a -> Sem r (Either e a)
- IncipitCore: failToEmbed :: forall (m :: Type -> Type) (r :: [(Type -> Type) -> Type -> Type]) a. (Member (Embed m) r, MonadFail m) => Sem ((Fail :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
+ IncipitCore: failToEmbed :: forall (m :: Type -> Type) (r :: EffectRow) a. (Member (Embed m) r, MonadFail m) => Sem ((Fail :: (Type -> Type) -> Type -> TYPE LiftedRep) : r) a -> Sem r a
- IncipitCore: failToError :: forall e (r :: [(Type -> Type) -> Type -> Type]) a. Member (Error e :: (Type -> Type) -> Type -> Type) r => (String -> e) -> Sem ((Fail :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
+ IncipitCore: failToError :: forall e (r :: EffectRow) a. Member (Error e :: (Type -> Type) -> Type -> Type) r => (String -> e) -> Sem ((Fail :: (Type -> Type) -> Type -> TYPE LiftedRep) : r) a -> Sem r a
- IncipitCore: failToNonDet :: forall (r :: [(Type -> Type) -> Type -> Type]) a. Member NonDet r => Sem ((Fail :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
+ IncipitCore: failToNonDet :: forall (r :: EffectRow) a. Member NonDet r => Sem ((Fail :: (Type -> Type) -> Type -> TYPE LiftedRep) : r) a -> Sem r a
- IncipitCore: finally :: forall (r :: [(Type -> Type) -> Type -> Type]) a b. Member Resource r => Sem r a -> Sem r b -> Sem r a
+ IncipitCore: finally :: forall (r :: EffectRow) a b. Member Resource r => Sem r a -> Sem r b -> Sem r a
- IncipitCore: fromEither :: forall e (r :: [(Type -> Type) -> Type -> Type]) a. Member (Error e :: (Type -> Type) -> Type -> Type) r => Either e a -> Sem r a
+ IncipitCore: fromEither :: forall e (r :: EffectRow) a. Member (Error e :: (Type -> Type) -> Type -> Type) r => Either e a -> Sem r a
- IncipitCore: fromEitherM :: forall e m (r :: [(Type -> Type) -> Type -> Type]) a. (Member (Error e :: (Type -> Type) -> Type -> Type) r, Member (Embed m) r) => m (Either e a) -> Sem r a
+ IncipitCore: fromEitherM :: forall e m (r :: EffectRow) a. (Member (Error e :: (Type -> Type) -> Type -> Type) r, Member (Embed m) r) => m (Either e a) -> Sem r a
- IncipitCore: fromException :: forall e (r :: [(Type -> Type) -> Type -> Type]) a. (Exception e, Member (Error e :: (Type -> Type) -> Type -> Type) r, Member (Embed IO) r) => IO a -> Sem r a
+ IncipitCore: fromException :: forall e (r :: EffectRow) a. (Exception e, Member (Error e :: (Type -> Type) -> Type -> Type) r, Member (Embed IO) r) => IO a -> Sem r a
- IncipitCore: fromExceptionSem :: forall e (r :: [(Type -> Type) -> Type -> Type]) a. (Exception e, Member (Error e :: (Type -> Type) -> Type -> Type) r, Member (Final IO) r) => Sem r a -> Sem r a
+ IncipitCore: fromExceptionSem :: forall e (r :: EffectRow) a. (Exception e, Member (Error e :: (Type -> Type) -> Type -> Type) r, Member (Final IO) r) => Sem r a -> Sem r a
- IncipitCore: fromExceptionSemVia :: forall exc err (r :: [(Type -> Type) -> Type -> Type]) a. (Exception exc, Member (Error err :: (Type -> Type) -> Type -> Type) r, Member (Final IO) r) => (exc -> err) -> Sem r a -> Sem r a
+ IncipitCore: fromExceptionSemVia :: forall exc err (r :: EffectRow) a. (Exception exc, Member (Error err :: (Type -> Type) -> Type -> Type) r, Member (Final IO) r) => (exc -> err) -> Sem r a -> Sem r a
- IncipitCore: fromExceptionVia :: forall exc err (r :: [(Type -> Type) -> Type -> Type]) a. (Exception exc, Member (Error err :: (Type -> Type) -> Type -> Type) r, Member (Embed IO) r) => (exc -> err) -> IO a -> Sem r a
+ IncipitCore: fromExceptionVia :: forall exc err (r :: EffectRow) a. (Exception exc, Member (Error err :: (Type -> Type) -> Type -> Type) r, Member (Embed IO) r) => (exc -> err) -> IO a -> Sem r a
- IncipitCore: get :: forall s (r :: [Effect]). MemberWithError (State s :: (Type -> Type) -> Type -> Type) r => Sem r s
+ IncipitCore: get :: forall s (r :: EffectRow). Member (State s :: (Type -> Type) -> Type -> Type) r => Sem r s
- IncipitCore: getInspectorT :: forall (e :: Effect) (f :: Type -> Type) (m :: Type -> Type) (r :: [Effect]). Sem (WithTactics e f m r) (Inspector f)
+ IncipitCore: getInspectorT :: forall (e :: Effect) (f :: Type -> TYPE LiftedRep) (m :: Type -> Type) (r :: [Effect]). Sem (WithTactics e f m r) (Inspector f)
- IncipitCore: gets :: forall s a (r :: [(Type -> Type) -> Type -> Type]). Member (State s :: (Type -> Type) -> Type -> Type) r => (s -> a) -> Sem r a
+ IncipitCore: gets :: forall s a (r :: EffectRow). Member (State s :: (Type -> Type) -> Type -> Type) r => (s -> a) -> Sem r a
- IncipitCore: input :: forall i (r :: [Effect]). MemberWithError (Input i :: (Type -> Type) -> Type -> Type) r => Sem r i
+ IncipitCore: input :: forall i (r :: EffectRow). Member (Input i :: (Type -> Type) -> Type -> Type) r => Sem r i
- IncipitCore: inputToReader :: forall i (r :: [(Type -> Type) -> Type -> Type]) a. Member (Reader i) r => Sem ((Input i :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
+ IncipitCore: inputToReader :: forall i (r :: EffectRow) a. Member (Reader i) r => Sem ((Input i :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
- IncipitCore: inputs :: forall i j (r :: [(Type -> Type) -> Type -> Type]). Member (Input i :: (Type -> Type) -> Type -> Type) r => (i -> j) -> Sem r j
+ IncipitCore: inputs :: forall i j (r :: EffectRow). Member (Input i :: (Type -> Type) -> Type -> Type) r => (i -> j) -> Sem r j
- IncipitCore: intercept :: forall e (r :: [Effect]) a. (Member e r, FirstOrder e "intercept") => (forall x (rInitial :: EffectRow). () => e (Sem rInitial) x -> Sem r x) -> Sem r a -> Sem r a
+ IncipitCore: intercept :: forall e (r :: EffectRow) a. (Member e r, FirstOrder e "intercept") => (forall x (rInitial :: EffectRow). () => e (Sem rInitial) x -> Sem r x) -> Sem r a -> Sem r a
- IncipitCore: interceptH :: forall e (r :: [Effect]) a. Member e r => (forall x (rInitial :: EffectRow). () => e (Sem rInitial) x -> Tactical e (Sem rInitial) r x) -> Sem r a -> Sem r a
+ IncipitCore: interceptH :: forall e (r :: EffectRow) a. Member e r => (forall x (rInitial :: EffectRow). () => e (Sem rInitial) x -> Tactical e (Sem rInitial) r x) -> Sem r a -> Sem r a
- IncipitCore: listen :: forall o (r :: [Effect]) a. MemberWithError (Writer o) r => Sem r a -> Sem r (o, a)
+ IncipitCore: listen :: forall o (r :: EffectRow) a. Member (Writer o) r => Sem r a -> Sem r (o, a)
- IncipitCore: local :: forall i (r :: [Effect]) a. MemberWithError (Reader i) r => (i -> i) -> Sem r a -> Sem r a
+ IncipitCore: local :: forall i (r :: EffectRow) a. Member (Reader i) r => (i -> i) -> Sem r a -> Sem r a
- IncipitCore: mapError :: forall e1 e2 (r :: [(Type -> Type) -> Type -> Type]) a. Member (Error e2 :: (Type -> Type) -> Type -> Type) r => (e1 -> e2) -> Sem ((Error e1 :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
+ IncipitCore: mapError :: forall e1 e2 (r :: EffectRow) a. Member (Error e2 :: (Type -> Type) -> Type -> Type) r => (e1 -> e2) -> Sem ((Error e1 :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
- IncipitCore: modify :: forall s (r :: [(Type -> Type) -> Type -> Type]). Member (State s :: (Type -> Type) -> Type -> Type) r => (s -> s) -> Sem r ()
+ IncipitCore: modify :: forall s (r :: EffectRow). Member (State s :: (Type -> Type) -> Type -> Type) r => (s -> s) -> Sem r ()
- IncipitCore: modify' :: forall s (r :: [(Type -> Type) -> Type -> Type]). Member (State s :: (Type -> Type) -> Type -> Type) r => (s -> s) -> Sem r ()
+ IncipitCore: modify' :: forall s (r :: EffectRow). Member (State s :: (Type -> Type) -> Type -> Type) r => (s -> s) -> Sem r ()
- IncipitCore: note :: forall e (r :: [(Type -> Type) -> Type -> Type]) a. Member (Error e :: (Type -> Type) -> Type -> Type) r => e -> Maybe a -> Sem r a
+ IncipitCore: note :: forall e (r :: EffectRow) a. Member (Error e :: (Type -> Type) -> Type -> Type) r => e -> Maybe a -> Sem r a
- IncipitCore: onException :: forall (r :: [(Type -> Type) -> Type -> Type]) a b. Member Resource r => Sem r a -> Sem r b -> Sem r a
+ IncipitCore: onException :: forall (r :: EffectRow) a b. Member Resource r => Sem r a -> Sem r b -> Sem r a
- IncipitCore: output :: forall o (r :: [Effect]). MemberWithError (Output o :: (Type -> Type) -> Type -> Type) r => o -> Sem r ()
+ IncipitCore: output :: forall o (r :: EffectRow). Member (Output o :: (Type -> Type) -> Type -> Type) r => o -> Sem r ()
- IncipitCore: outputToIOMonoid :: forall o m (r :: [(Type -> Type) -> Type -> Type]) a. (Monoid m, Member (Embed IO) r) => (o -> m) -> Sem ((Output o :: (Type -> Type) -> Type -> Type) : r) a -> Sem r (m, a)
+ IncipitCore: outputToIOMonoid :: forall o m (r :: EffectRow) a. (Monoid m, Member (Embed IO) r) => (o -> m) -> Sem ((Output o :: (Type -> Type) -> Type -> Type) : r) a -> Sem r (m, a)
- IncipitCore: outputToIOMonoidAssocR :: forall o m (r :: [(Type -> Type) -> Type -> Type]) a. (Monoid m, Member (Embed IO) r) => (o -> m) -> Sem ((Output o :: (Type -> Type) -> Type -> Type) : r) a -> Sem r (m, a)
+ IncipitCore: outputToIOMonoidAssocR :: forall o m (r :: EffectRow) a. (Monoid m, Member (Embed IO) r) => (o -> m) -> Sem ((Output o :: (Type -> Type) -> Type -> Type) : r) a -> Sem r (m, a)
- IncipitCore: outputToWriter :: forall o (r :: [(Type -> Type) -> Type -> Type]) a. Member (Writer o) r => Sem ((Output o :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
+ IncipitCore: outputToWriter :: forall o (r :: EffectRow) a. Member (Writer o) r => Sem ((Output o :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
- IncipitCore: pass :: forall o (r :: [Effect]) a. MemberWithError (Writer o) r => Sem r (o -> o, a) -> Sem r a
+ IncipitCore: pass :: forall o (r :: EffectRow) a. Member (Writer o) r => Sem r (o -> o, a) -> Sem r a
- IncipitCore: put :: forall s (r :: [Effect]). MemberWithError (State s :: (Type -> Type) -> Type -> Type) r => s -> Sem r ()
+ IncipitCore: put :: forall s (r :: EffectRow). Member (State s :: (Type -> Type) -> Type -> Type) r => s -> Sem r ()
- IncipitCore: resourceToIOFinal :: forall (r :: [(Type -> Type) -> Type -> Type]) a. Member (Final IO) r => Sem (Resource : r) a -> Sem r a
+ IncipitCore: resourceToIOFinal :: forall (r :: EffectRow) a. Member (Final IO) r => Sem (Resource : r) a -> Sem r a
- IncipitCore: retag :: forall {k1} {k2} (k3 :: k1) (k4 :: k2) (e :: (Type -> Type) -> Type -> Type) (r :: [(Type -> Type) -> Type -> Type]) a. Member (Tagged k4 e) r => Sem (Tagged k3 e : r) a -> Sem r a
+ IncipitCore: retag :: forall {k1} {k2} (k3 :: k1) (k4 :: k2) (e :: (Type -> Type) -> Type -> Type) (r :: EffectRow) a. Member (Tagged k4 e) r => Sem (Tagged k3 e : r) a -> Sem r a
- IncipitCore: runAtomicStateIORef :: forall s (r :: [(Type -> Type) -> Type -> Type]) a. Member (Embed IO) r => IORef s -> Sem ((AtomicState s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
+ IncipitCore: runAtomicStateIORef :: forall s (r :: EffectRow) a. Member (Embed IO) r => IORef s -> Sem ((AtomicState s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
- IncipitCore: runAtomicStateTVar :: forall (r :: [(Type -> Type) -> Type -> Type]) s a. Member (Embed IO) r => TVar s -> Sem ((AtomicState s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
+ IncipitCore: runAtomicStateTVar :: forall (r :: EffectRow) s a. Member (Embed IO) r => TVar s -> Sem ((AtomicState s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
- IncipitCore: runFail :: forall (r :: [(Type -> Type) -> Type -> Type]) a. Sem ((Fail :: (Type -> Type) -> Type -> Type) : r) a -> Sem r (Either String a)
+ IncipitCore: runFail :: forall (r :: [(Type -> Type) -> Type -> TYPE LiftedRep]) a. Sem ((Fail :: (Type -> Type) -> Type -> TYPE LiftedRep) : r) a -> Sem r (Either String a)
- IncipitCore: runInputConst :: forall i (r :: [(Type -> Type) -> Type -> Type]) a. i -> Sem ((Input i :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
+ IncipitCore: runInputConst :: forall i (r :: [(Type -> Type) -> TYPE LiftedRep -> Type]) a. i -> Sem ((Input i :: (Type -> Type) -> TYPE LiftedRep -> Type) : r) a -> Sem r a
- IncipitCore: runOutputBatched :: forall o (r :: [(Type -> Type) -> Type -> Type]) a. Member (Output [o] :: (Type -> Type) -> Type -> Type) r => Int -> Sem ((Output o :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
+ IncipitCore: runOutputBatched :: forall o (r :: EffectRow) a. Member (Output [o] :: (Type -> Type) -> Type -> Type) r => Int -> Sem ((Output o :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
- IncipitCore: runOutputMonoidIORef :: forall o m (r :: [(Type -> Type) -> Type -> Type]) a. (Monoid m, Member (Embed IO) r) => IORef m -> (o -> m) -> Sem ((Output o :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
+ IncipitCore: runOutputMonoidIORef :: forall o m (r :: EffectRow) a. (Monoid m, Member (Embed IO) r) => IORef m -> (o -> m) -> Sem ((Output o :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
- IncipitCore: runOutputMonoidTVar :: forall o m (r :: [(Type -> Type) -> Type -> Type]) a. (Monoid m, Member (Embed IO) r) => TVar m -> (o -> m) -> Sem ((Output o :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
+ IncipitCore: runOutputMonoidTVar :: forall o m (r :: EffectRow) a. (Monoid m, Member (Embed IO) r) => TVar m -> (o -> m) -> Sem ((Output o :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
- IncipitCore: runStateIORef :: forall s (r :: [(Type -> Type) -> Type -> Type]) a. Member (Embed IO) r => IORef s -> Sem ((State s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
+ IncipitCore: runStateIORef :: forall s (r :: EffectRow) a. Member (Embed IO) r => IORef s -> Sem ((State s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
- IncipitCore: runStateSTRef :: forall s st (r :: [(Type -> Type) -> Type -> Type]) a. Member (Embed (ST st)) r => STRef st s -> Sem ((State s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
+ IncipitCore: runStateSTRef :: forall s st (r :: EffectRow) a. Member (Embed (ST st)) r => STRef st s -> Sem ((State s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r a
- IncipitCore: runWriterTVar :: forall o (r :: [(Type -> Type) -> Type -> Type]) a. (Monoid o, Member (Final IO) r) => TVar o -> Sem (Writer o : r) a -> Sem r a
+ IncipitCore: runWriterTVar :: forall o (r :: EffectRow) a. (Monoid o, Member (Final IO) r) => TVar o -> Sem (Writer o : r) a -> Sem r a
- IncipitCore: send :: forall e (r :: [(Type -> Type) -> Type -> Type]) a. Member e r => e (Sem r) a -> Sem r a
+ IncipitCore: send :: forall e (r :: EffectRow) a. Member e r => e (Sem r) a -> Sem r a
- IncipitCore: sequenceConcurrently :: forall t (r :: [(Type -> Type) -> Type -> Type]) a. (Traversable t, Member Async r) => t (Sem r a) -> Sem r (t (Maybe a))
+ IncipitCore: sequenceConcurrently :: forall t (r :: EffectRow) a. (Traversable t, Member Async r) => t (Sem r a) -> Sem r (t (Maybe a))
- IncipitCore: stateToIO :: forall s (r :: [(Type -> Type) -> Type -> Type]) a. Member (Embed IO) r => s -> Sem ((State s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r (s, a)
+ IncipitCore: stateToIO :: forall s (r :: EffectRow) a. Member (Embed IO) r => s -> Sem ((State s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r (s, a)
- IncipitCore: stateToST :: forall s st (r :: [(Type -> Type) -> Type -> Type]) a. Member (Embed (ST st)) r => s -> Sem ((State s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r (s, a)
+ IncipitCore: stateToST :: forall s st (r :: EffectRow) a. Member (Embed (ST st)) r => s -> Sem ((State s :: (Type -> Type) -> Type -> Type) : r) a -> Sem r (s, a)
- IncipitCore: subsume :: forall (e :: Effect) (r :: [Effect]) a. Member e r => Sem (e : r) a -> Sem r a
+ IncipitCore: subsume :: forall (e :: Effect) (r :: EffectRow) a. Member e r => Sem (e : r) a -> Sem r a
- IncipitCore: tag :: forall {k1} (k2 :: k1) (e :: (Type -> Type) -> Type -> Type) (r :: [(Type -> Type) -> Type -> Type]) a. Member (Tagged k2 e) r => Sem (e : r) a -> Sem r a
+ IncipitCore: tag :: forall {k1} (k2 :: k1) (e :: (Type -> Type) -> Type -> Type) (r :: EffectRow) a. Member (Tagged k2 e) r => Sem (e : r) a -> Sem r a
- IncipitCore: tell :: forall o (r :: [Effect]). MemberWithError (Writer o) r => o -> Sem r ()
+ IncipitCore: tell :: forall o (r :: EffectRow). Member (Writer o) r => o -> Sem r ()
- IncipitCore: throw :: forall e (r :: [Effect]) a. MemberWithError (Error e :: (Type -> Type) -> Type -> Type) r => e -> Sem r a
+ IncipitCore: throw :: forall e (r :: EffectRow) a. Member (Error e :: (Type -> Type) -> Type -> Type) r => e -> Sem r a
- IncipitCore: transform :: forall e1 e2 (r :: [Effect]) a. Member e2 r => (forall (rInitial :: EffectRow) x. () => e1 (Sem rInitial) x -> e2 (Sem rInitial) x) -> Sem (e1 : r) a -> Sem r a
+ IncipitCore: transform :: forall e1 e2 (r :: EffectRow) a. Member e2 r => (forall (rInitial :: EffectRow) x. () => e1 (Sem rInitial) x -> e2 (Sem rInitial) x) -> Sem (e1 : r) a -> Sem r a
- IncipitCore: try :: forall e (r :: [(Type -> Type) -> Type -> Type]) a. Member (Error e :: (Type -> Type) -> Type -> Type) r => Sem r a -> Sem r (Either e a)
+ IncipitCore: try :: forall e (r :: EffectRow) a. Member (Error e :: (Type -> Type) -> Type -> Type) r => Sem r a -> Sem r (Either e a)
- IncipitCore: tryJust :: forall e (r :: [(Type -> Type) -> Type -> Type]) b a. Member (Error e :: (Type -> Type) -> Type -> Type) r => (e -> Maybe b) -> Sem r a -> Sem r (Either b a)
+ IncipitCore: tryJust :: forall e (r :: EffectRow) b a. Member (Error e :: (Type -> Type) -> Type -> Type) r => (e -> Maybe b) -> Sem r a -> Sem r (Either b a)
- IncipitCore: type WithTactics (e :: Effect) (f :: Type -> Type) (m :: Type -> Type) (r :: [Effect]) = Tactics f m e : r :: Type -> Type -> Type -> Type : r
+ IncipitCore: type WithTactics (e :: Effect) (f :: Type -> TYPE LiftedRep) (m :: Type -> Type) (r :: [Effect]) = Tactics f m e : r :: Type -> Type -> TYPE LiftedRep -> Type : r
- IncipitCore: type family Members (es :: [k]) (r :: [k])
+ IncipitCore: type family Members (es :: [Effect]) (r :: EffectRow)
- IncipitCore: writerToEndoWriter :: forall o (r :: [(Type -> Type) -> Type -> Type]) a. (Monoid o, Member (Writer (Endo o)) r) => Sem (Writer o : r) a -> Sem r a
+ IncipitCore: writerToEndoWriter :: forall o (r :: EffectRow) a. (Monoid o, Member (Writer (Endo o)) r) => Sem (Writer o : r) a -> Sem r a
- IncipitCore: writerToIOAssocRFinal :: forall o (r :: [(Type -> Type) -> Type -> Type]) a. (Monoid o, Member (Final IO) r) => Sem (Writer o : r) a -> Sem r (o, a)
+ IncipitCore: writerToIOAssocRFinal :: forall o (r :: EffectRow) a. (Monoid o, Member (Final IO) r) => Sem (Writer o : r) a -> Sem r (o, a)
- IncipitCore: writerToIOFinal :: forall o (r :: [(Type -> Type) -> Type -> Type]) a. (Monoid o, Member (Final IO) r) => Sem (Writer o : r) a -> Sem r (o, a)
+ IncipitCore: writerToIOFinal :: forall o (r :: EffectRow) a. (Monoid o, Member (Final IO) r) => Sem (Writer o : r) a -> Sem r (o, a)
Files
- changelog.md +12/−0
- incipit-core.cabal +13/−6
- lib/IncipitCore.hs +5/−0
- readme.md +65/−0
+ changelog.md view
@@ -0,0 +1,12 @@+# Unreleased++# 0.3.0.0++* Remove module exports for `Prelude` to avoid a Stack bug.+* Rename `Incipit` modules to `IncipitBase` and `IncipitCore`.+* Add more `try*` combinators and use consistent naming.++# 0.2.0.0++* Add `unitT`, returning `()` in a `Tactical` environment+* Hide Polysemy's effect GADT constructors
incipit-core.cabal view
@@ -1,11 +1,11 @@ cabal-version: 2.2 --- This file has been generated from package.yaml by hpack version 0.34.6.+-- This file has been generated from package.yaml by hpack version 0.35.0. -- -- see: https://github.com/sol/hpack name: incipit-core-version: 0.3.0.0+version: 0.4.0.0 synopsis: A Prelude for Polysemy description: See https://hackage.haskell.org/package/incipit-core/docs/IncipitCore.html category: Prelude@@ -17,6 +17,9 @@ license: BSD-2-Clause-Patent license-file: LICENSE build-type: Simple+extra-source-files:+ changelog.md+ readme.md source-repository head type: git@@ -45,6 +48,8 @@ , Data.IntSet , Data.Map.Lazy , Data.Map.Strict+ , Data.Map.Merge.Lazy+ , Data.Map.Merge.Strict , Data.Sequence , Data.Set , Data.Text@@ -57,6 +62,7 @@ hs-source-dirs: lib default-extensions:+ NoImplicitPrelude AllowAmbiguousTypes ApplicativeDo BangPatterns@@ -77,6 +83,7 @@ DisambiguateRecordFields DoAndIfThenElse DuplicateRecordFields+ EmptyCase EmptyDataDecls ExistentialQuantification FlexibleContexts@@ -91,8 +98,9 @@ MultiParamTypeClasses MultiWayIf NamedFieldPuns- OverloadedStrings+ OverloadedLabels OverloadedLists+ OverloadedStrings PackageImports PartialTypeSignatures PatternGuards@@ -116,10 +124,9 @@ UndecidableInstances UnicodeSyntax ViewPatterns- NoImplicitPrelude ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Widentities -Wunused-packages build-depends:- base >=4.13 && <4.17- , incipit-base ==0.3.0.0+ base >=4.13 && <4.18+ , incipit-base ==0.4.0.0 , polysemy >=1.6 default-language: Haskell2010
lib/IncipitCore.hs view
@@ -1,3 +1,4 @@+{-# language CPP #-} -- |This is the central module on which to build upon when constructing Preludes for Polysemy libraries. -- It reexports most core effects. module IncipitCore (@@ -16,7 +17,9 @@ module Polysemy.Tagged, module Polysemy.Writer, module IncipitCore,+#if !MIN_VERSION_polysemy(1,8,0) send,+#endif ) where import Incipit.Exception@@ -31,7 +34,9 @@ import Polysemy.Fail hiding (Fail) import Polysemy.Input (Input) import Polysemy.Input hiding (Input)+#if !MIN_VERSION_polysemy(1,8,0) import Polysemy.Internal (send)+#endif import Polysemy.Internal.Kind (Append) import Polysemy.Output (Output) import Polysemy.Output hiding (Output)
+ readme.md view
@@ -0,0 +1,65 @@+# About++This library provides a `Prelude` for [Polysemy] libraries, building upon [incipit-base] and exporting most of+Polysemy's core modules.+For a more comprehensive variant that includes some basic libraries, consider [incipit].++# Usage++Using a custom `Prelude` requires the use of Cabal mixins to hide the module from `base` and replace it with+`IncipitCore`:++For `hpack`:+```yaml+dependencies:+ - name: base+ version: '>= 4 && < 5'+ mixin:+ - hiding (Prelude)+ - name: incipit-core+ version: '>= 0.3'+ mixin:+ - (IncipitCore as Prelude)+ - hiding (IncipitCore)+```++For `cabal`:+```cabal+build-depends:+ base >=4 && <5, incipit-core >= 0.3+mixins:+ base hiding (Prelude), incipit-core (IncipitCore as Prelude), incipit-core hiding (IncipitCore)+```++`incipit-core` used to export `Prelude`, but+[stack can't deal with that](https://github.com/commercialhaskell/stack/issues/5414).++# Custom Prelude++In order to extend `incipit-core` with a local `Prelude`, the module `IncipitCore` has to be reexported:++```yaml+dependencies:+ - name: base+ version: '>= 4 && < 5'+ mixin:+ - hiding (Prelude)+ - incipit-core >= 0.3+```++```haskell+module Prelude (+ module Prelude,+ module IncipitCore,+) where++import IncipitCore++projectName :: Text+projectName =+ "spaceship"+```++[incipit-base]: https://hackage.haskell.org/package/incipit-base+[incipit]: https://hackage.haskell.org/package/incipit+[Polysemy]: https://hackage.haskell.org/package/polysemy