4

All tutorials on GADTs that I've seen (in Haskell, Coq and Idris) use one same exapmle of a well-typed interpreter to show how GADTs can be useful, where you use the type index to encode the type of the term in the object language.

What are some other examples and general rules for when we should think of GADT as a solution?

Alex
  • 284
  • 1
  • 4
  • 1
    [Why do 'some examples' and 'list of things' questions get closed?](http://meta.softwareengineering.stackexchange.com/a/7538/31260) – gnat Feb 27 '17 at 17:07
  • 3
    admins why do you ruin your own community?? Good question, let him ask! – Sam Feb 28 '17 at 14:46

1 Answers1

-5

Link dump for the OCaml side of things:

Some concrete use cases:

Drup
  • 204
  • 1
  • 1
  • 5
    Link dumps don't make good answers because links eventually die. Can you bring some of the relevant content from these links into your answer? – MetaFight Feb 27 '17 at 16:12
  • 1
    No I can't. OP expects a set of concrete use cases, So I provide concrete use cases as links to the actual libraries. Not a simplified toy explanation that would fit here. This is an extremely common question that comes back frequently. I don't see the value of not pointing to external significant sources. – Drup Feb 27 '17 at 19:42
  • 1
    @Drup It's against the conventions of this site. Note that the question itself is off-topic here and shouldn't be answered at all. – Andres F. Feb 27 '17 at 21:35