Real world use of GADT
GADTs are weak approximations of inductive families from dependently typed languages—so let’s begin there instead. Inductive families are the core datatype introduction method in a dependently typed language. For instance, in Agda you define the natural numbers like this data Nat : Set where zero : Nat succ : Nat -> Nat which isn’t very … Read more