SkillAgentSearch skills...

Trel

Relational programming for OCaml (unreleased)

Install / Use

/learn @dbuenzli/Trel
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Trel — Relational programming for OCaml

%%VERSION%%

Trel is a typed relational programming language embedded in OCaml. Its term language is arbitrarily extensible allowing clients to inject and project OCaml values and functions for seamless interaction between Trel and regular OCaml programs.

Trel is a typed and type-safe implementation of μKanren distributed under the ISC license. It depends on fmt.

Homepage: http://erratique.ch/software/trel

Minimal typed μKanren implementation

Consult mk.mli and mk.ml and its tests for an absolute minimal typed and type-safe μKanren in the spirit of the original one.

The implementation shows how to define an arbitrarily extensible typed term language and a simple API for typed reification of states. This is the core on which Trel adds a bit of convenience.

Other OCaml implementations of {mini,μ}Kanren are listed on the miniKanren website.

Installation

Trel can be installed with opam:

opam install trel

If you don't use opam consult the opam file for build instructions.

Documentation

The documentation and API reference is generated from the source interfaces. It can be consulted online or via odig doc trel.

Sample programs

If you installed Trel with opam sample programs are located in the directory opam var trel:doc.

In the distribution sample programs and tests are located in the test directory. They can be built and run with:

topkg build --tests true && topkg test 

Related Skills

View on GitHub
GitHub Stars24
CategoryDevelopment
Updated5mo ago
Forks0

Languages

OCaml

Security Score

87/100

Audited on Oct 25, 2025

No findings