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

Jules Bean jules at jellybean.co.uk
Wed Mar 21 04:54:42 EDT 2007


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