package primavera

  1. Overview
  2. Docs
Dependency injection based on a Reader Monad

Install

dune-project
 Dependency

Authors

Maintainers

Sources

primavera-1.1.0.tbz
sha256=37c94e820b973564844d96a91717684ca909777104cc8cf28ce32ca4fd005225
sha512=524aa638b859ba236793fbb6eb24c5e6315b3a6eede47661e84873c01872579fc4c9fc26e4f380785b79784ab1580c3a9e588f9d6e21419979c3d38d7e5990a8

doc/README.html

Primavera

To make our software easy to test (and potentially to vary its runtime or interpretation), OCaml provides several tools likes:

Although these approaches all offer advantages—such as continuity checking for effects and the ability to introduce types for modules—these advantages often capture aspects of very advanced programming. And sometimes, we would like a simpler approach, while still preserving type inference and tracking dependencies within the type system.

Primavera combines OCaml's object model with a Reader Monad to allow certain operations to be abstracted while still being tracked within the type system. See the teletype example for a very brief usage example.

The library also provides functors for building wrappers around parameterized types such as Result, Lwt, or Option, and allows you to describe traversable structures.