Just a hunch! Not super experienced with GADTs at all, just couldn’t think of how you could possibly express it in a type signature and so assumed that it wasn’t possible. If it is possible, I kind of imagine it’s one of those things you can do with GADTs but that require you to basically do proofs using witnesses and the like. A while back I remember trying the reverse a hlist twice puzzle and my takeaway was “here be dragons.”
Joel
5
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Heterogeneous lists (difflist) puzzle: functions versus pairs | 6 | 909 | January 22, 2023 | |
| List with GADTs | 1 | 631 | July 1, 2022 | |
| [GADT] iterate over heterogeneous list | 4 | 411 | October 17, 2024 | |
| Create a functor based on Ctypes bindings for C Doubly-Linked List | 1 | 1172 | May 5, 2018 | |
| List typing issue | 1 | 271 | February 5, 2024 |