Hacker News new | past | comments | ask | show | jobs | submit login

No, there are no heterogeneous list "implementations". There are ways to get the type system to basically use the type-class as the "type" instead of the concrete type (this is how you get heterogeneous lists in languages like C#/Java as well btw). That means the same normal list can hold this heterogeneous data, as could maps, sets, Maybe, anything.



http://hackage.haskell.org/package/HList-0.2.3 sure seems like an "implementation" of heterogeneous lists.


That looks like some kind of research thing, not something anyone is using. And as I say, there is no need to since you can use Existential types or GADTs to type the list on interface instead of representation. And that will give you heterogeneous containers of any kind where as this package you showed would only work for this one kind of package.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: