[Haskell-cafe] records proposals list

Keean Schupke k.schupke at imperial.ac.uk
Tue Nov 22 06:28:36 EST 2005

Just a follow up to my last post ... The HList paper also presents a way of
removing overlapping instances from _any_ class. So infact support for 
instances is no longer required - and this removes all the messy 
problems with
overlapping instances and functional dependancies.

The current HList source distribution runs in hugs with "-98 +o" only 
because of
"lazyness" on out part. All the occurances of overlapping instances can 
(will?) be
removed from the source if it becomes an important issue (most of them are
in auxilliary definitions that are not in the paper, like Show for HList.

If you program in the "completely non overlapping instances" model, then 
support for deriving TTypeable would be nice, or compiler support for a type
level equality constraint (TypeEq could become a built-in). But just to 
make it clear - compiler
support for this is not necessary, you just define instances of 
TTypeable for all your datatypes.
There is a template-haskell library that can automatically derive 
TTypeable for any datatype
as well.


David Menendez wrote:

>Keean Schupke writes:
>>    Haskell already has static records (in H98)
>>    Dynamic records are addressed by the HList library, which uses 
>>extensions already present in GHC and Hugs (namely Multi-parameter 
>>type-classes and function-dependancies).
>Is this the case? Every implementation of HList that I've seen also uses
>overlapping and undecidable instances.

More information about the Haskell-Cafe mailing list