On Sat, Sep 11, 1999 at 04:51:35PM +0200, Jose Emilio Labra Gayo wrote:
> 
> 
> On Fri, 10 Sep 1999, Simon Raahauge DeSantis wrote:
> 
[Snip hugs warning vs erroring with multiple definitions of functions that
aren't close to each other]
> Well, it was just an example. There is a lot of common bugs that the 
> system can try to detect (I am talking about "warnings", not "errors"). 
> 
> Repeated definitions can be writen as:
> 
> f x = "hello"
> 
> -- A long comment
> 
> f x = "bye"
> 
> And the system could report a warning (not an error). 

Sorry, I was a bit hasty and didn't catch the warning (not error) bit
originally. My apologies. Though if this is biting you often maybe you
should change your coding practices?
"Doctor, it hurst when I do this."
"Don't do that."

> 
> > > 2.- Try to recover from the first error 
> > > ---------------------------------------
> > > Hugs could give a list of [line number]-[error message] instead
> > > of reporting only the first error. 
> > 
> > My experience with this in C compiliers (Older version of Symantic C/C++
> > springs to mind, and also gcc) is that often fixing the first error clears
> > up some of the subsequent error reports (ie they were caused by parsing
> > breaking down). I think this would be especially true with the layout rule
> > and all.
> > 
> I think that it depends on the way you develop your program. 
> Sometimes you write it interactively (one function each time) 
> and you only need the first error. 
> But sometimes you get a whole program and try to compile it. 
> I remember when I was adapting some programs from Haskell 1.4 
> to Haskell 98 and It would have been very useful that the system 
> reported more errors than only the first one. 
> 

Sorry again. I realized after I sent this that I hadn't really spelled out
what I wanted to say, which was that since the later errors are usually
spurious (though that could be just the fault of a bad compilier) it's
usually only worth it to fix the first error and then recompile/reload to
see how many go away. I can see how this would be helpful however in your
case where a lot of errors probably wouldn't be the fault of layout or
anything but undefined functions and changes in functions.

-- 
-Simon Raahauge DeSantis


Reply via email to