# Tutorial on GADTs

**URL:** <https://discuss.ocaml.org/t/tutorial-on-gadts/14040>\
**Category:** Learning\
**Tags:** gadt, tutorial, blog\
**Created:** [February 8, 2024, 7:57pm UTC](https://discuss.ocaml.org/t/tutorial-on-gadts/14040 "2024-02-08T19:57:24Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![raphael-proust](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/raphael-proust/32/415_2.png) [@raphael-proust](https://discuss.ocaml.org/u/raphael-proust)\
**Post date:** [February 8, 2024, 7:57pm UTC](https://discuss.ocaml.org/t/tutorial-on-gadts/14040/1 "2024-02-08T19:57:24Z")

</div>

I’ve written a three-part tutorial on GADTs.  
[The first part](https://raphael-proust.gitlab.io/code/my-first-gadt.html) shows the very basic. It is intended for anyone who already knows OCaml but hasn’t written a GADT before.  
[The second part](https://raphael-proust.gitlab.io/code/gadt-tips-and-tricks.html) is a collection of different techniques you can use when making your own GADT. It is intended as a follow-up of the first part or for programmers who have written GADTs before but feel like they still have things to learn.  
[The third part](https://raphael-proust.gitlab.io/code/gadt-gallery.html) is a gallery of GADTs found in the public OCaml software ecosystem. It’s intended for anyone who wants to see practical-use examples.

I intend to expand the gallery of GADTs (part three). Let me know if you have suggestions.

---

_[View the full topic](https://discuss.ocaml.org/t/tutorial-on-gadts/14040)._
