79699515

Date: 2025-07-12 19:18:53
Score: 0.5
Natty:
Report link

If anyone ever finds this, the answer was to use the WriterT.tell<W, M>() variant of the tell method - then it's possible to use Eff<RT>. I.e.

public static Eff<RT, bool> doThingWithRuntime<RT>() 
   where RT: struct => 
        liftEff(rt => true);

public static WriterT<StringM, Eff<RT>, string> SayHelloWorld<RT>() 
   where RT: struct => 
        from _1 in WriterT.tell<StringM, Eff<RT>>("world")
        from _2 in doThingWithRuntime<RT>() // now compiles
        from _3 in WriterT.tell<StringM, Eff<RT>>("!")
        select "hello";
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Andy Charalambous