mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
Interpose with an upcast.
This commit is contained in:
parent
92ac53252e
commit
c53a6aa511
@ -163,10 +163,10 @@ instance ( Member (Reader ModuleInfo) sig
|
||||
|
||||
|
||||
interpose :: (Member eff sig, HFunctor eff, Carrier sig m)
|
||||
=> (forall v. eff m (m v) -> m v)
|
||||
-> Eff (InterposeC eff m) a
|
||||
-> m a
|
||||
interpose handler = runInterposeC handler . interpret
|
||||
=> (forall v. eff (Eff m) (Eff m v) -> Eff m v)
|
||||
-> Eff m a
|
||||
-> Eff m a
|
||||
interpose handler = runInterposeC handler . interpret . upcast
|
||||
|
||||
upcast :: Eff m a -> Eff (InterposeC eff (Eff m)) a
|
||||
upcast m = Eff (\ k -> InterposeC (\ f -> m >>= runInterposeC f . k))
|
||||
|
Loading…
Reference in New Issue
Block a user