ocaml.lang.compatibility.deprecated.deprecated-pervasives

profile photo of semgrepsemgrep
Author
4,866
Download Count*

Pervasives is deprecated and will not be available after 4.10. Use Stdlib.

Run Locally

Run in CI

Defintion

rules:
  - id: deprecated-pervasives
    pattern: Pervasives.$X
    message: Pervasives is deprecated and will not be available after 4.10. Use Stdlib.
    languages:
      - ocaml
    severity: ERROR
    metadata:
      category: compatibility
      technology:
        - ocaml
      license: Commons Clause License Condition v1.0[LGPL-2.1-only]

Examples

deprecated.ml

let test1 () =
  (* ruleid:deprecated-pervasives *)
  let x = Pervasives.compare in
  x 1 2