package js_of_ocaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Javascript-specific effect functions.

val assume_no_perform : (unit -> 'a) -> 'a

Passing a function f as argument of `assume_no_perform` guarantees that, when compiling with `--effects=double-translation`, the direct-style version of f is called, which is faster than the CPS version. As a consequence, performing an effect in a transitive callee of f will raise `Effect.Unhandled`, regardless of any effect handlers installed before the call to `assume_no_perform`, unless a new effect handler was installed in the meantime.

This behaviour is the same when double translation is disabled.

OCaml

Innovation. Community. Security.