3 ms·
Are you able to comment on your implementation of row types? You give the following type for a field selector: > :t .foo (a.foo::b) => (a) -> b These give c
by willtim 9y ago
Are you able to comment on your implementation of row types?
You give the following type for a field selector:
> :t .foo
(a.foo::b) => (a) -> b
These give constraints with arbitrary types embedded in them. Most examples in the literature using qualified types, suggest something like the following type:
(r lacks foo) => { foo :: b | r } -> b
Where r is of kind row. The lacks constraint here is a very simple constraint and it is clear that this function takes a record, the disadvantage is that predicate lists can get very large. The old Haskell TREX extension built into Hugs worked this way.
It would be great to learn some background behind your choice. Thanks.
- kthielen 9y agoYes, TREX and Mark Jones's work on qualified types was very influential to this project. I am a big fan of that work. I added a few details in this post below: https://news.ycombinator.com/item?id=14787429 https://news.ycombinator.com/item?id=14787429 I hope that answers your questions although I know that there's a lot more that could be said about this topic.