[Haskell] really undecidable instances?

Wolfgang Jeltsch wolfgang at jeltsch.net
Mon Oct 17 11:12:25 EDT 2005


Am Montag, 17. Oktober 2005 15:57 schrieben Sie:
> This one 

[That is the instance declaration instance C Int a => D Char [a].]

> can't.  But it's hard to formulate a general rule.
> -fallow-undecidable-instances simply says that you, the programmer, take 
> responsibility for termination.  Without the flag, GHC uses a simple but
> sometimes over-conservative rule
>
> Simon

[Could you please put citations at the top of the respective mail?]

Section 7.4.4.3 of the GHC User's guide says about the restrictions for 
ensuring decidability:

	These restrictions ensure that context reduction terminates: each reduction
	step removes one type constructor.

But as far as I can see, in my example there is also one type constructor 
removed.  Why isn't this allowed then?

Best wishes,
Wolfgang


More information about the Haskell mailing list