[Haskell-cafe] Problem with overlapping class instances

Graham Klyne gk at ninebynine.org
Tue Nov 23 04:31:38 EST 2004


At 21:40 22/11/04 +0100, Ralf Laemmel wrote:
>Instance selection and thereby overlapping resolution
>is *independent* of constraints. It is defined to be purely
>syntactical in terms of instance heads. See the HList paper
>for some weird examples.

That explains it.  Thanks!

#g
--



>Ralf
>
>
>Graham Klyne wrote:
>
>>
>>The reported overlapping instance is [Char], which I take to be derived 
>>from the type constructor [] applied to type Char, this yielding a form 
>>that matches (cw c).  But the instance ConceptExpr (cw c) is declared to 
>>be dependent on the context ConceptWrapper cw c, which has *not* been 
>>declared for the type constructor [].
>>
>>GHCi with -fglasgow-exts is no more informative.
>>
>>What am I missing here?
>

------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact



More information about the Haskell-Cafe mailing list