# \#gadts

**URL:** https://discuss.ocaml.org/tag/gadts/530.md

[Latest](https://discuss.ocaml.org/latest.md) · [Categories](https://discuss.ocaml.org/categories.md) · [Tags](https://discuss.ocaml.org/tags.md)

---

## [A pattern for using GADTs to subset cases](https://discuss.ocaml.org/t/a-pattern-for-using-gadts-to-subset-cases/13675)

<div class="topic-metadata">

**Author:** [@polytypic](https://discuss.ocaml.org/u/polytypic)\
**Replies:** 19\
**Last updated:** [September 17, 2024, 12:24am UTC](https://discuss.ocaml.org/t/a-pattern-for-using-gadts-to-subset-cases/13675 "2024-09-17T00:24:59Z")

</div>

Hello! The topic of using GADTs comes up every now and then. Personally I find that when I’m using GADTs in an attempt to optimize code I almost always quickly run into some “surprise” that doesn’t pass the type checke…

---

## [Mapping GADT with Polymorphic Variant into a more restrictive form](https://discuss.ocaml.org/t/mapping-gadt-with-polymorphic-variant-into-a-more-restrictive-form/12214)

<div class="topic-metadata">

**Author:** [@Ben\_James](https://discuss.ocaml.org/u/Ben_James)\
**Replies:** 5\
**Last updated:** [May 24, 2023, 9:13pm UTC](https://discuss.ocaml.org/t/mapping-gadt-with-polymorphic-variant-into-a-more-restrictive-form/12214 "2023-05-24T21:13:44Z")

</div>

Hello! Suppose I have the following GADT in Ocaml: type \_ t = | A : f t | B : f t \* f t -\> f t | C : c t \* c t -\> f t | D : \[\< f | c\] t \* c t -\> c t | E : c t | T : string -\> \[\< f | c\] t where f and c are …

---

## [Need help to understand GADTs](https://discuss.ocaml.org/t/need-help-to-understand-gadts/10133)

<div class="topic-metadata">

**Author:** [@Jazz](https://discuss.ocaml.org/u/Jazz)\
**Replies:** 5\
**Last updated:** [July 6, 2022, 6:46pm UTC](https://discuss.ocaml.org/t/need-help-to-understand-gadts/10133 "2022-07-06T18:46:28Z")

</div>

Hi, The following snippet from The Manual, type \_ term = | Int : int -\> int term | Add : (int -\> int -\> int) term | App : ('b -\> 'a) term \* 'b term -\> 'a term ;; I am having a hard time to understand that…
