On Monday 17 October 2005 15:57, Simon Peyton-Jones wrote:
| Wolfgang Jeltsch:
| what ist the problem with instance declarations like the following:
|
| instance C Int a = D Char [a]
|
| Why are such declarations only allowed with
| -fallow-undecidable-instances in
| GHC? How can they
Benjamin Franksen writes:
This is the data type declaration:
data Node23 tree a
= N2 (tree a) a (tree a)
| N3 (tree a) a (tree a) a (tree a)
and this is the instance, where the error is reported:
instance (Pretty a, Pretty (tree a)) = Pretty (Node23 tree a) where
...
On Sunday 30 October 2005 21:59, David Menendez wrote:
Benjamin Franksen writes:
This is the data type declaration:
data Node23 tree a
= N2 (tree a) a (tree a)
| N3 (tree a) a (tree a) a (tree a)
and this is the instance, where the error is reported:
instance (Pretty a,
are tricky (co-authored with Martin Sulzmann, Peter Stuckey and Gregory
Duck).
Simon
| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Wolfgang
| Jeltsch
| Sent: 17 October 2005 16:12
| To: Haskell ML
| Subject: Re: [Haskell] really undecidable instances
Simon Peyton-Jones wrote:
It's all very delicate. I believe, though I am not certain, that in the
absence of functional dependencies, removing at least one type
constructor might be an example of a rule that is sufficient to ensure
termination. There are lots of such rules. Alas none known to
Hello,
what ist the problem with instance declarations like the following:
instance C Int a = D Char [a]
Why are such declarations only allowed with -fallow-undecidable-instances in
GHC? How can they result in undecidability?
Best wishes,
Wolfgang
PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Wolfgang
| Jeltsch
| Sent: 17 October 2005 14:17
| To: Haskell ML
| Subject: [Haskell] really undecidable instances?
|
| Hello,
|
| what ist the problem with instance declarations like the following:
|
| instance C Int a = D Char [a]
|
| Why
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