[Hs-Generics] FW: [Haskell-cafe] SYB vs HList (again)

S. Alexander Jacobson alex at alexjacobson.com
Thu Mar 22 04:35:50 EDT 2007

Not sure the proposal helps me with my other issues.  The appealing 
thing about hlists is that labels are first class which means obvious 
ways of parsing URLEncoded Strings and obvious ways to render them in 
XML.  In particular HLists are actually a different type from 
positional data declarations and that is good.


On Wed, 21 Mar 2007, Jules Bean wrote:

> S. Alexander Jacobson wrote:
>> Conceptually, I think what I really want is the data structure equivalent 
>> of type inference.  Just as I don't want to be forced to declare my 
>> function types, I don't want to be forced to declare my data types.  The 
>> field labels I use should be enough to define the shape of my type.  The 
>> reason this is really important is that if hlists contain hlists, the type 
>> declarations can get really really messy
>> Separately, I would really like hrecords not to have order dependency. It 
>> seems strange to me that (Foo .*. Bar .*. HNil) is a different type from 
>> (Bar .*. Foo .*. HNil).
> These particular two issues : type inference based on record 'shape' and 
> records without order dependency, (ignoring the SYB part of the problem for 
> the moment) are both addressed in the following haskell records proposal 
> (and, undoubtedly, others) 
> http://research.microsoft.com/~simonpj/Haskell/records.html
> Jules

More information about the Haskell-Cafe mailing list