
15 Oct
2004
15 Oct
'04
5:48 a.m.
Although I still miss a simple primitive language construct to do 'extensible record',
If you look at the OOHaskell, and HList papers, you will see the neatest way of defining an HList based extensible record is: record = label1 .=. value1 .*. label2 .=. value2 .*. label3 .=. value3 .*. emptyRecord A record is built by using the record-product operator (.*.) on a label-value pair and a record... emptyRecord is obviously provided so you can start with 'nothing'. All the class definitions to make this possible are hidden in the HList library... The only other thing required is to declare your labels... Keean.