This repo contains some interesting GADT code pieces. Most codes are easy, but some are probably quite complicated to you. Few may be even at jaw-dropping level...
GADT is used in the following way:
-
enforcing invariants at compile-time so implementation is correct by guarantee
-
more powerful data structure, e.g., heterogeneous list
-
maybe more...