lean4-htt/tests/compiler/foreign
Leonardo de Moura 989d8f04e1 chore: fix tests
2022-06-14 17:27:13 -07:00
..
Main chore: fix tests 2022-06-14 17:27:13 -07:00
Main.lean test: --load-dynlib 2021-11-04 15:32:07 -07:00
Makefile chore: use configured C++ compiler for foreign test 2021-11-09 09:27:10 +01:00
myfuns.cpp test: --load-dynlib 2021-11-04 15:32:07 -07:00
README.md test: --load-dynlib 2021-11-04 15:32:07 -07:00

Small project implemented using Lean and C++. The C++ file myfuns.cpp wraps a C++ object using an lean_external_object. The file myfuns.cpp exposes pure and effectful primitives. The file Main.lean contains a small Lean program that uses the exported primitives.

Build instructions

Assuming the Lean bin/ directory (e.g. from build/release/stage1) is in your PATH, executing leanmake build/bin/test will create the executable build/bin/test; see the Makefile for further variants.

The executable build/bin/test should produce the output

30
hello
foobla
world