[Haskell-cafe] records proposals list

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

The HList code does not need overlapping-instances, however it does use 
instances. This is not however bad like overlapping instances is. 
Overlapping instances
can break module independance (as in defining a new instance can change 
the meaning
of an existing class in modules that are already compiled). Undecidable 
instances merely
means the compiler is not capable of proving that the constraints 
terminate. In the
case of an HList they "obviously" do (where the constraint recursion is 
structurally over
the length of a list termination is obvious). This is more a weakness in 
the compiler rather
than some problem with the HList code.


Wolfgang Jeltsch wrote:

>Am Dienstag, 22. November 2005 07:33 schrieb David Menendez:
>>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.
>The paper about HList I have seen does explicitely say that the authors were 
>finally able to avoid using overlapping instances.  I don't know about 
>undecidable instances but I thought (and hope very much) that they don't need 
>them too.
>Best wishes,
>Haskell-Cafe mailing list
>Haskell-Cafe at haskell.org

More information about the Haskell-Cafe mailing list