Re: [Haskell] really undecidable instances?

2005-10-30 Thread Benjamin Franksen
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

Re: [Haskell] really undecidable instances?

2005-10-30 Thread David Menendez
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 ...

Re: [Haskell] really undecidable instances?

2005-10-30 Thread Benjamin Franksen
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,

RE: [Haskell] really undecidable instances?

2005-10-18 Thread Simon Peyton-Jones
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

Re: [Haskell] really undecidable instances?

2005-10-18 Thread Johannes Waldmann
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

[Haskell] really undecidable instances?

2005-10-17 Thread Wolfgang Jeltsch
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

RE: [Haskell] really undecidable instances?

2005-10-17 Thread Simon Peyton-Jones
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

Re: [Haskell] really undecidable instances?

2005-10-17 Thread Wolfgang Jeltsch
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