Zenith
is a Lean 4 library inspired by ZIO.
Right now the main goals are pedagogical:
- Explore how to translate certain OO patterns into Lean
- Simple implementation of ZIO better suited for high level analysis
- Visualization of program execution
- etc
But once the library matures enough it should be usable for regular programming.
- Dependency Injection
- Error handling
- Asynchronous and Concurrent programming
- Program execution diagram
- Core data type and interpreter ✅
- Fibers ✅
- Environment ✅
- Layers ❌
- Find a workaround for the limitation that
Z
Services can't be used in environment. - Scopes and FiberRefs
- Fiber supervision
- Concurrency primitives
- Better integration with Lean features
- Elan is needed to install
lake
, which will in turn download project dependencies (i.e. the specific Lean 4 version). VSCode
+Lean 4
plugin is the recommended editor.
lake build
Using the entr
file monitor
find . -name "*.lean" | entr -s 'lake build'
./build/bin/z
(Graphviz needs to be installed)
for f in $(find diagrams -name "*.dot"); do echo $f; dot -Tsvg $f -o diagrams/$(basename $f .dot).svg; done
This will (re)create a bunch of svg files under diagrams/*
.