FreshML

1 program Added 2026-02-26T12:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: Fresh O'Caml
Provenance: commit 9c2f0c9777 · authored 2026-02-26T17:49:36+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

JoCaml (0.18)HardCaml (0.17)Free Pascal (0.16)Fril (0.15)Frege (0.14)

LLM-contributed programs

Lambda Calculus with Native Binders

Provenance: commit 9c2f0c9777 · authored 2026-02-26T17:49:36+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.ml · added: 2026-02-26T12:00:00Z
(* FreshML - Lambda Calculus with Native Binders *)
(* FreshML extends Standard ML with abstract names and binding types *)

(* Lambda calculus term type *)
datatype term =
    Var of name            (* variable reference *)
  | App of term * term     (* function application *)
  | Lam of <<name>> term   (* lambda abstraction with binder *)

(* Structural size of a term *)
fun size (Var _)        = 1
  | size (App(t1, t2))  = 1 + size t1 + size t2
  | size (Lam(<<_>> t)) = 1 + size t

(* Depth of the term tree *)
fun depth (Var _)        = 0
  | depth (App(t1, t2))  = 1 + Int.max(depth t1, depth t2)
  | depth (Lam(<<_>> t)) = 1 + depth t

(* Free variable check: is x free in t? *)
fun is_free (x : name) (Var y)         = (x = y)
  | is_free x            (App(t1, t2)) = is_free x t1 orelse is_free x t2
  | is_free x            (Lam(<<y>> t)) = is_free x t  (* y is fresh, so y <> x *)

Contribute — propose a file extension

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