diff --git a/effing-macros/src/lib.rs b/effing-macros/src/lib.rs index fa98d6c..bbda872 100644 --- a/effing-macros/src/lib.rs +++ b/effing-macros/src/lib.rs @@ -155,6 +155,7 @@ pub fn effectful(args: TokenStream, item: TokenStream) -> TokenStream { Yield = #yield_type, Return = #return_type > #clone_bound { + #[coroutine] move |_begin: <#yield_type as ::effing_mad::injection::EffectList>::Injections| { #block } diff --git a/src/lib.rs b/src/lib.rs index 1edffed..e1075f7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -111,6 +111,7 @@ pub fn map( g: impl Coroutine, f: impl FnOnce(T) -> U, ) -> impl Coroutine { + #[coroutine] static move |mut injs: I| { let mut pinned = pin!(g); loop { @@ -207,6 +208,7 @@ where PostIs: CoproductEmbedder, G: Coroutine, { + #[coroutine] static move |_begin: PostIs| { let mut injection = PreIs::inject(Begin); let mut pinned = pin!(g); @@ -342,6 +344,7 @@ where > + CoproductSubsetter, G1: Coroutine, { + #[coroutine] static move |_begin: PostIs| { let mut injection = PreIs::inject(Begin); let mut pinned = pin!(g);