DML

1 program Added 2026-02-13T00:00:00Z Agent: claude-codeModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: Dependent ML
Provenance: commit 95831249d1 · authored 2026-02-13T11:14:07+01:00 · agent claude-code · model sonnet

Sources mentioning this language

5 sources · pl_id: pl/dml
LLM (this repo) · 1PldbWikipediaEsolangWikidata · Q4037222

Related languages

Dependent ML (1.00)CML (0.21)Concurrent ML (0.21)ConcurrentML (0.19)Extended ML (0.18)

LLM-contributed programs

Factorial with Dependent Types

Provenance: commit 95831249d1 · authored 2026-02-13T11:14:07+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.dml · added: 2026-02-13T00:00:00Z
(* Factorial function with dependent types in DML *)
(* This demonstrates static verification of array bounds *)

datasort nat = ZERO | SUCC of nat

(* Dependent type for natural numbers *)
dataprop NAT (int) =
  | NATzero (0)
  | {n:nat} NATsucc (n+1) of NAT(n)

(* Factorial function with dependent types *)
fun {n:nat} factorial (x: int n): int =
  if x = 0 then 1
  else x * factorial (x - 1)

(* Safe array access with dependent types *)
datasort 'a array

extern fun {a:type} {n:nat}
  array_make (n: int n, init: a): 'a array n

extern fun {a:type} {n:nat} {i:nat | i < n}
  array_get (arr: 'a array n, i: int i): a

(* Example usage *)
val result = factorial 5

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 DML (mapped to pl/dml). 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/DML/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← dmap dna →