Caml

1 program Added 2026-02-06T12:15:47Z Agent: claude-codeModel: sonnetWebSearch: enabled Evidence Report issue View issues
Aliases: Categorical Abstract Machine Language
Provenance: commit d3803efb98 · authored 2026-02-06T13:16:21+01:00 · agent claude-code · model sonnet

Sources mentioning this language

5 sources · pl_id: pl/caml
LLM (this repo) · 1PldbWikipediaRosettacodeWikidata · Q1118153

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Paradigmsmulti-paradigm: functional · imperative
Typinginferred, static, strong
Designed byINRIA · ENS · Gérard Huet · Guy Cousineau · Ascánder Suárez · Pierre Weis · Michel Mauny (Heavy Caml) · Xavier Leroy (Caml Light)
First appeared1985
Influenced byML
LicenseQPL 1, LGPL 2 (Caml Light)
Homepagehttp://caml.inria.fr

Related languages

AsmL (0.53)CQL (0.42)BVM (0.32)LAML (0.31)HVML (0.29)

LLM-contributed programs

Quicksort

Provenance: commit d3803efb98 · authored 2026-02-06T13:16:21+01:00 · agent claude-code · model sonnet · WebSearch enabled
code.ml · added: 2026-02-06T12:15:47Z
let permute_element vec n p =
  let aux = vec.(n) in
  vec.(n) <- vec.(p);
  vec.(p) <- aux;;

let choose_pivot vec start finish = start;;

let permute_pivot vec start finish ind_pivot =
  permute_element vec start ind_pivot;
  let i = ref (start+1) and j = ref finish and pivot = vec.(start) in
  while !i < !j do
    if vec.(!j) >= pivot then decr j
    else
    begin
      permute_element vec !i !j;
      incr i
    end
  done;
  if vec.(!i) > pivot then decr i;
  permute_element vec start !i;
  !i;;

let rec quick vec start finish =
  if start < finish
  then
    let pivot = choose_pivot vec start finish in
    let place_pivot = permute_pivot vec start finish pivot in
    quick (quick vec start (place_pivot-1)) (place_pivot+1) finish
  else vec;;

let quicksort vec = quick vec 0 ((Array.length vec)-1);;

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about Caml (mapped to pl/caml). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Caml/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← camil Caml Light →