On 30 May 2015 at 19:01, Jonathan S. Shapiro <jonathan.s.shap...@gmail.com> wrote:
> Two questions regarding type-indexed lists: > > Are these lists, or should I think of this as record extension? > Well you could do either. I presented a simple version were records get stored in a type indexed type-level list, but you can have a record extension syntax as sugar. > > What guarantees that the field names of the components are > non-overlapping? What happens when they overlap? > In Haskell record labels cannot be re-used in different records as they define accessor functions. But in theory unambiguous accessors drive the type-indexed list, so you can tell from the accessor function which element in the type indexed list to access. If they overlap you would need to disambiguate the type: (t :: R).a So we extract the element of type 'R' from the type-indexed list and access the 'a' element. Keean.
_______________________________________________ bitc-dev mailing list bitc-dev@coyotos.org http://www.coyotos.org/mailman/listinfo/bitc-dev