OcamlDuce

1 program Added 2026-03-13T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: ocamlduce
Provenance: commit 58ae14d750 · authored 2026-03-13T02:46:06+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

CDuce (0.27)XDuce (0.27)Reduce (0.25)Objective Caml (0.19)OCaml (0.19)

LLM-contributed programs

Hello World with XML Types

Provenance: commit 58ae14d750 · authored 2026-03-13T02:46:06+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.ml · added: 2026-03-13T10:00:00Z
(* OcamlDuce example: basic XML type manipulation *)
(* OcamlDuce extends OCaml with CDuce's type-safe XML processing *)

type greeting = {{ <greeting>[PCDATA] }}

let greet (msg : {{ Latin1 }}) : {{ greeting }} =
  {{ <greeting>[msg] }}

let extract (g : {{ greeting }}) : {{ Latin1 }} =
  match g with {{ <greeting>[s] }} -> s

let () =
  let g = greet {{ "Hello, OcamlDuce!" }} in
  let s = extract g in
  print_string (CDuce.string_of_latin1 s);
  print_newline ()

Contribute — propose a file extension

Tell us where to find evidence about OcamlDuce (mapped to pl/ocamlduce). 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/OcamlDuce/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← OCaml Occam →