Skip to content

zoep/LazyOcaml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Lazyness in Ocaml with Syntax Extensions

LazySugar.ml provides force and delay operators implemented as synatic sugar using camlp5 preprocessor. This is completely useless since Ocaml already provides a Lazy module, but it was fun anyway :).

Delay and force can be expessed as syntactic sugar as follows:

equation

Usage

To compile LazySugar.ml:

$ ocamlc  -pp "camlp5o pa_extend.cmo q_MLast.cmo" -I +camlp5 -c LazySugar.ml

To use delay and force in an ocaml program, namely test.ml:

$ ocamlc -pp "camlp5o path/to/LazySugar.cmo" test.ml -o test

About

Lazyness in Ocaml with Syntax Extensions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages