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.Deep - no description

Documentation

       Module Deep
        : sigend

       Deep handlers

       type('a,'b)continuation = ('a,'b)continuation('a,'b)continuation is a delimited continuation that expects a 'a value and returns a 'b value.

       valcontinue : ('a,'b)continuation->'a->'bcontinuekx resumes the continuation k by passing x to k .

       RaisesContinuation_already_resumed if the continuation has already been resumed.

       valdiscontinue : ('a,'b)continuation->exn->'bdiscontinueke resumes the continuation k by raising the exception e in k .

       RaisesContinuation_already_resumed if the continuation has already been resumed.

       valdiscontinue_with_backtrace : ('a,'b)continuation->exn->Printexc.raw_backtrace->'bdiscontinue_with_backtracekebt resumes the continuation k by raising the exception e in k using bt as
       the origin for the exception.

       RaisesContinuation_already_resumed if the continuation has already been resumed.

       type('a,'b)handler = {
        retc : 'a->'b ;
        exnc : exn->'b ;
        effc : 'c.'cEffect.t->(('c,'b)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.

       valmatch_with : ('c->'a)->'c->('a,'b)handler->'bmatch_withfvh runs the computation fv in the handler h .

       type'aeffect_handler = {
        effc : 'b.'bEffect.t->(('b,'a)continuation->'a)option ;
        }

       'aeffect_handler  is  a deep handler with an identity value handler funx->x and an exception handler
       that raises any exception fune->raisee .

       valtry_with : ('b->'a)->'b->'aeffect_handler->'atry_withfvh runs the computation fv under the handler h .

       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.Deep(3o)

Module

       Module   Effect.Deep

Name

       Effect.Deep - no description

See Also