Skip to content
forked from ocaml/ocaml

The core OCaml system: compilers, runtime system, base libraries

License

Notifications You must be signed in to change notification settings

OlivierNicole/ocaml

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About the macros branch

macros_unstable is merged into macros on a regular basis, once a set of changes has been applied and the tests run.

Overview

This is an experimental implementation of OCaml macros, originally designed by Leo White and Jeremy Yallop:

You can find a summary of the current progress here:

This branch is based on version 4.04 of OCaml.

Installation

Installation instruction are the same as for the standard OCaml distribution. You can find a few examples of what is possible in the links above. You can also take a look at the testsuite/tests/macros/ directory.

Installing OPAM packages

Most packages should compile fine, but causes that may break your packages include:

  • a use of the reserved words static or macro as an identifier;

  • a use of $ as a regular operator.

If you need to install Camlp4, you will have to pin it to this repository. Please be aware that this version of Camlp4 is only provided for backward-compatibility and can only generate "pre-macro" OCaml, i.e. it cannot generate any of the macro constructs.

Contributing

You are very welcome to try out macros. Please do report any bugs or inconvenience by opening an issue on this repo.

Pull requests

Found a bug and know how to fix it? We certainly appreciate pull requests. If you plan on making big changes, please file an issue first to discuss why theses changes are needed.

Limitations / To Do

Things to be done sorted by descending priority:

  • Support for declaring static type extensions (including static exceptions)

  • Solve issues of static linking and side effects, possibly by banning the static keyword

  • Upgrade of ocamldep to take into account the modifications in dependency trees because of the above

  • Fix GADT matching in quotations

List of Contributors

The implementation of macros is an OCaml Labs research project.

Main collaborators:

  • Olivier Nicole, main developer

  • Leo White, quoting library, original design and supervision

  • Jeremy Yallop, original design and supervision

  • Oleg Kiselyov, developer of BER MetaOCaml, from which macros are inspired

  • Gemma Gordon, project manager

About

The core OCaml system: compilers, runtime system, base libraries

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • OCaml 76.7%
  • C 15.1%
  • Makefile 2.3%
  • Emacs Lisp 1.8%
  • Assembly 1.4%
  • Standard ML 1.4%
  • Other 1.3%