Re: False duplicate or overlapping instances message

2000-10-27 Thread Jeffrey R. Lewis
Simon Peyton-Jones wrote: | I think I've worked out what's going on now. But I don't like it. | When I use -fallow-undecidable-instances and -fallow-overlapping-instances | (as I did) I was assuming (like Keith Wansbrough did) that | GHC would do a Prolog-style backtracking search when it

RE: False duplicate or overlapping instances message

2000-10-26 Thread Simon Peyton-Jones
| I think I've worked out what's going on now. But I don't like it. | When I use -fallow-undecidable-instances and -fallow-overlapping-instances | (as I did) I was assuming (like Keith Wansbrough did) that | GHC would do a Prolog-style backtracking search when it was time to resolve | an

Re: False duplicate or overlapping instances message

2000-10-26 Thread Marcin 'Qrczak' Kowalczyk
Thu, 26 Oct 2000 01:29:38 -0700, Simon Peyton-Jones [EMAIL PROTECTED] pisze: a') when trying to solve a constraint, search for all solutions, and check that in the end there is only one. b') never comlain of overlap when declaring instance declarations; instead only complain when solving

Re: False duplicate or overlapping instances message

2000-10-26 Thread George Russell
Marcin 'Qrczak' Kowalczyk wrote: [snip] I am worried if the following scenario is possible: There are two modules. Everything is OK. Now one of them adds an innocent instance. It is perfectly correct in its context, but it happens that it triggers an ambiguity in the second module. Still

False duplicate or overlapping instances message

2000-10-25 Thread George Russell
When I compile the attached file on Linux with 4.08.1: /home/ger/ghc-4.08.1-binary/bin/ghc -c Instances.hs -fglasgow-exts -fallow-overlapping-instances -fallow-undecidable-instances I get the message: Instances.hs:1: Duplicate or overlapping instance declarations for `HasConfig

Re: False duplicate or overlapping instances message

2000-10-25 Thread Keith Wansbrough
Instances.hs:1: Duplicate or overlapping instance declarations for `HasConfig (arcTypeConfig value) (arcTypeParms value)' defined at Instances.hs:19 and defined at Instances.hs:11 This is not fair, because while the instances for HasConfig have the potential to

Re: False duplicate or overlapping instances message

2000-10-25 Thread George Russell
Keith Wansbrough wrote: Instances.hs:1: Duplicate or overlapping instance declarations for `HasConfig (arcTypeConfig value) (arcTypeParms value)' defined at Instances.hs:19 and defined at Instances.hs:11 This is not fair, because while the instances for

Re: False duplicate or overlapping instances message

2000-10-25 Thread George Russell
Keith Wansbrough wrote: You can now see that the two instance declarations overlap: their right hand sides are in fact *identical*. Remember that the typechecker simply matches on the right-hand sides ("heads") of the instance declarations. No they do not overlap, unless there is