Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (40 sloc) 1.6 KB
opam-version: "2.0"
maintainer: "Didier Le Botlan <github.lebotlan@dfgh.net>"
authors: "Didier Le Botlan <github.lebotlan@dfgh.net>"
homepage: "https://github.com/lebotlan/ocaml-exenum"
bug-reports: "https://github.com/lebotlan/ocaml-exenum/issues"
license: "MIT License"
dev-repo: "git://github.com/lebotlan/ocaml-exenum.git"
build: [
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
]
depends: [
"ocaml" {>= "4.02.3"}
"dune" {build}
"zarith"
]
depopts: "lwt"
synopsis:
"Build efficient enumerations for datatypes. Inspired by Feat for Haskell."
description: """
The exenum library offers constructors to build enumerations for
datatypes, that is, functions from (arbitrarily large) integers to
values. Such enumerations are typically used for unit testing. The
library is efficient: the n-th element of an enumeration is returned
without having computed the (n-1) previous elements. Complexity is in
log(n), except for some pathological datatypes. See the homepage for
details: https://github.com/lebotlan/ocaml-exenum
Inspired by Feat: Functional Enumeration of Algebraic Types, by
Duregard, Jansson, Wang, Chalmers University.
As an example, consider the following datatype:
type term = Var of string | App of term * term | Lambda of string * term
Using exenum, one may easily generate zillions of different
lambda-terms. In our specific example, term number 2000000000000
happens to be
((((x v) (fun u -> y)) ((fun u -> y) (fun y -> y))) (((x
v) (fun u -> v)) (fun u -> y)))"""
url {
src: "https://github.com/lebotlan/ocaml-exenum/archive/0.86.tar.gz"
checksum: "md5=a4854a0286dfd8bcb3f34003365195a9"
}
You can’t perform that action at this time.