This commit is contained in:
ProgramSnail 2025-11-30 00:42:04 +03:00
parent f1433eb62d
commit 19b9d3aa56
9 changed files with 199 additions and 0 deletions

20
lib/dune Normal file
View file

@ -0,0 +1,20 @@
(env
(_
(flags
(:standard -warn-error +5))))
(library
(name lib1)
(modules lib)
(flags (-rectypes))
(libraries OCanren OCanren.tester)
(inline_tests)
(wrapped false)
(preprocess
(pps
OCanren-ppx.ppx_repr
OCanren-ppx.ppx_fresh
OCanren-ppx.ppx_distrib
GT.ppx
GT.ppx_all
ppx_inline_test)))

17
lib/lib.ml Normal file
View file

@ -0,0 +1,17 @@
open OCanren
module Lam = struct
[%%distrib
type nonrec ('varname, 'self) t =
| V of 'varname
| App of 'self * 'self
| Abs of 'varname * 'self
[@@deriving gt ~options:{ show; fmt; gmap }]
type ground = (GT.string, ground) t]
let varX = !!"x"
let varY = !!"y"
let varF = !!"f"
end