3 ms·
Sure. The paper mentions HList, the "heterogeneous list" package, which often gets used for extensible records and static duck typing; HList uses type-level nu
by JoshTriplett 15y ago
Sure.
The paper mentions HList, the "heterogeneous list" package, which often gets used for extensible records and static duck typing; HList uses type-level numbers and lists, and extensive type-level computation. I've wanted to use HList in the past, but the sheer pain of the types involved made it not worth the trouble. It also includes several (incompatible) variations of internal implementations with different tradeoffs.
Several packages exist for "session typing", which allows specification of a communication protocol between functions by using complementary types. Those involve heavy type-level computation on families of related types; this extension would help greatly.
I've personally encountered multiple cases where I'd like to operate on an arbitrary function or type regardless of its arity (how many arguments it takes), but doing so typically requires writing a family of handlers for various argument lengths. This extension would allow handling all of the cases generically.