4 ms·
OCaml already does. Some good examples - JSON GADT : https://github.com/OCamlPro/ocplib-json-typed/blob/0d9e9cde74c7c50aa6d053990b46f5930c80de54/src/json_encod
by anmolsahoo25 5y ago
OCaml already does. Some good examples -
JSON GADT : https://github.com/OCamlPro/ocplib-json-typed/blob/0d9e9cde74c7c50aa6d053990b46f5930c80de54/src/json_encoding.ml#L46 https://github.com/OCamlPro/ocplib-json-typed/blob/0d9e9cde7...
Mirage/repr, uses GADT's for representing OCaml types as runtime values which are used for implementing dynamic polymorphism - https://github.com/mirage/repr/blob/main/src/repr/type.ml https://github.com/mirage/repr/blob/main/src/repr/type.ml
- whateveracct 5y agoI count OCaml as "mainstream" as Haskell ;) it's one of the good ones