logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Effect.Shallow - no description

Documentation

       Module Shallow
        : sigendtype('a,'b)continuation('a,'b)continuation is a delimited continuation that expects a 'a value and returns a 'b value.

       valfiber : ('a->'b)->('a,'b)continuationfiberf constructs a continuation that runs the computation f .

       type('a,'b)handler = {
        retc : 'a->'b ;
        exnc : exn->'b ;
        effc : 'c.'cEffect.t->(('c,'a)continuation->'b)option ;
        }

       ('a,'b)handler  is  a  handler  record  with  three  fields  -- retc is the value handler, exnc handles
       exceptions, and effc handles the effects performed by the computation enclosed by the handler.

       valcontinue_with : ('c,'a)continuation->'c->('a,'b)handler->'bcontinue_withkvh resumes the continuation k with value v with the handler h .

       RaisesContinuation_already_resumed if the continuation has already been resumed.

       valdiscontinue_with : ('c,'a)continuation->exn->('a,'b)handler->'bdiscontinue_withkeh resumes the continuation k by raising the exception e with the handler h .

       RaisesContinuation_already_resumed if the continuation has already been resumed.

       valdiscontinue_with_backtrace : ('a,'b)continuation->exn->Printexc.raw_backtrace->('b,'c)handler->'cdiscontinue_withkebth resumes the continuation k by raising the exception e with the handler h using
       the raw backtrace bt as the origin of the exception.

       RaisesContinuation_already_resumed if the continuation has already been resumed.

       valget_callstack : ('a,'b)continuation->int->Printexc.raw_backtraceget_callstackcn returns a description of the top of the call stack on the continuation c , with at most
       n entries.

OCamldoc                                           2025-06-12                                 Effect.Shallow(3o)

Module

       Module   Effect.Shallow

Name

       Effect.Shallow - no description

See Also