Overlapping, undecidable, incoherent -- or worse?
Alex Ferguson
abf at cs.ucc.ie
Thu May 20 22:15:30 EDT 2004
On Thu, May 20, 2004 at 07:34:18PM +0100, MR K P SCHUPKE wrote:
> that is not the case with "-fallow-undecidable-instances" ... as far as
> I understand it , ghc never considers the dependancies when selecting an
> instance. If you don't think so you will need to show me an example where
> it clearly does... as I haven't seen one yet (but just because I haven't
> seen it doesn't mean its not possible),,,
Am I to understand you're asserting that GHC "undecidable-instances" are
in fact decidable? Hugs explicitly documents its type system as being
undecidable, and I'd presumed this was the 'make GHC behave that way
too' flag.
> I mean, given two instances like:
>
> instance a b c
> instance d e f
>
> there is no way to tell between them... if you said choose a in preferenc
> 'a' would be chosen all the time.
If you were to indicate one instance declaration was preferred, and both
_could otherwise yield a suitable instance_, then that would be
prefered. (Though if one were to 'search' in the preference order of the
rules, one wouldn't need to find more than one in any event.)
More information about the Glasgow-haskell-users
mailing list