Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file dyn.ml
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768type'at=('a,Id.t*[`ActiveofOutput.active|`Msgofstring])resultletreturnx=Okxletfail~idmsg=Error(id,`Msgmsg)letstrip_id=function|Okx->Okx|Error(_,e)->Erroreletstatex=Ok(strip_idx)letcatch=function|Ok_asx->Okx|Error(_,(`Msg_asx))->Ok(Errorx)|Error(_,`Active_)asx->xletmsg_of_exn=function|Failurem->m|ex->Printexc.to_stringexletbindxf=matchxwith|Error_ase->e|Oky->fyletmap~idfx=matchxwith|Error_ase->e|Oky->matchfywith|y->Oky|exceptionex->Error(id,`Msg(msg_of_exnex))letmap_error~idfx=matchxwith|Error(_,`Msgm)->letm=tryfmwithex->msg_of_exnexinError(id,`Msgm)|_->xletpairab=matcha,bwith|(Error(_,`Msg_)ase),_|_,(Error(_,`Msg_)ase)->e|(Error(_,`Active_)ase),_|_,(Error(_,`Active_)ase)->e|Okx,Oky->Ok(x,y)letactive~ida=Error(id,`Activea)letrun=strip_idletppokf=function|Okx->okfx|Error(_,`Active`Waiting_for_confirmation)->Fmt.stringf"(waiting for confirmation)"|Error(_,`Active`Ready)->Fmt.stringf"(ready)"|Error(_,`Active`Running)->Fmt.stringf"(running)"|Error(_,`Msgm)->Fmt.pff"FAILED: %s"mletequal_progressxy=matchx,ywith|`Msgx,`Msgy->String.equalxy|`Activex,`Activey->Output.equal_activexy|_->falseletequal?(eq=(==))xy=matchx,ywith|Okx,Oky->eqxy|Error(id_x,x),Error(id_y,y)->Id.equalid_xid_y&&equal_progressxy|_->false