Closed wu-s-john closed 3 years ago
I'm not following why this code involves a GADT.
My understanding of a GADT is that it's an algebraic data type with a type parameter, where the instantiation of the type parameter is implied by the choice of constructor for the data type.
The versioning mechanism does work (now) with data types with a type parameter, in any case.
Stale.
Recently, I implemented a database that can store heterogenous key-value pairs and I used GADTs to cleanly do this in a type-safe way:
https://github.com/CodaProtocol/coda/blob/75606fed412a93520b12d96d437c26abef134198/src/lib/rocksdb/serializable.ml
This now requires GADTs to be versioned.