# Generating a corpus of Hazel programs from ill-typed OCaml programs

*2025-10-01 — paper*

Authors: Patrick Ferris, Anil Madhavapeddy


When developing a new programming language, having a large corpus of both
correct and incorrect programs allows language designers to test and explore
the capabilities of their new language. However, bootstrapping such a corpus of
incorrect programs is time consuming and arduous. We therefore explore how to
reuse code from more mature languages to generate a corpus of ill-typed code
for newer ones.

We have [developed a compiler](https://github.com/patricoferris/hazel_of_ocaml) to Hazel, an emerging language
with typed holes, from the more mature OCaml ecosystem. We find it practical to
generate a comprehensive corpus of ill-typed programs for Hazel development,
and discuss future larger scale efforts towards bridging ecosystems.


Classification: short
Venue: proceedings of the 2025 Workshop on Type-Driven Development (TyDe)
URL: https://conf.researchr.org/details/icfp-splash-2025/tyde-2025-papers/8/Generating-a-corpus-of-Hazel-programs-from-ill-typed-OCaml-programs-Extended-Abstrac
Projects: OCaml Labs

## Related

- [A Transpiler from OCaml to Hazel](https://patrick.sirref.org/hazel-of-ocaml/) (feed, 2025-05-02)
- [OxCaml Labs](https://anil.recoil.org/projects/oxcaml) (project, 2025-01-01)
- [OCaml Labs](https://anil.recoil.org/projects/ocamllabs) (project, 2012-01-01)

---
Canonical: https://anil.recoil.org/papers/2025-hazel-of-ocaml
Type: paper
License: CC BY 4.0 <https://creativecommons.org/licenses/by/4.0/>
Tags: ocaml, hazel, fp, conference, ocamllabs
