Hi, List
Fan , a
type-directed generic programming framework for OCaml Using Fan, a programmer can easily create generic libraries for type-directed
programs, including pretty printing, equality, serialization and deserialization, data generation, generic traversals, folds, etc.
Compared with
deriving, Fan is mainly different in such aspects:
1. It generate code without touching your source tree, module is
the basic unit. We generated code for all modules in ocaml's compiler
parsing/, typing/, and bootstrapped camlp4 source tree itself.
All modules beginning with Fan_ocaml is generated code for ocaml compiler
Fan_camlp4ast_o is for camlp4ast itself.
2. composable. All extended syntax are in our mini dsl language "fan" without polluting the original syntax
3. Lightweight Check the modules
gen_plugins we write generic printing, equality, map, fold traversal, etc,
9 generic plugins in less than 200 lines of code.
It's still at alpha stage, and I have some ideas that need to be polished, I would be happy to hear any feedback. We hope that FAN can benefit ocaml community as a camlp4 platform. Fan's code base is pretty small, all the Ast Transformations are based on quasi-quotations. The only exception is TyDcl which has no counter-part and Ast Lifting, since the current camlp4 does not support macro syntax in common lisp something like ``(,,).
Many Thanks
--
-- Bob