
is there an option to get ghc to keep going if it encounters an error building a file with --make? as in, I'd like it to continue compiling as much as it can only skipping what actually depends on the file that failed rather than completly aborting everything. John -- John Meacham - ⑆repetae.net⑆john⑈

John Meacham wrote:
is there an option to get ghc to keep going if it encounters an error building a file with --make? as in, I'd like it to continue compiling as much as it can only skipping what actually depends on the file that failed rather than completly aborting everything.
Certainly possible, and the -k flag is free, too :-) Care to submit a feature req? Cheers, SImon

Hello Simon, Friday, March 3, 2006, 4:51:04 PM, you wrote:
is there an option to get ghc to keep going if it encounters an error building a file with --make? as in, I'd like it to continue compiling as much as it can only skipping what actually depends on the file that failed rather than completly aborting everything.
SM> Certainly possible, and the -k flag is free, too :-) Care to submit a SM> feature req? it will also be great to make syntax analysis of all source files before compiling them. typical situation - after correcting program i run --make, long wait while some modules will be compiled and only after that ghc complains about some error. it's not yet feature req, just some thoughts about ideal compilation cycle: first syntax check all modules and print errors, then perform type analysis and report errors, then compile correct modules. what other haskellers think about this? another problem is what ghc tries to print entire block when it encounters error. but this block can contain hundreds of lines! moreover, error message and line number printed at the beginning, so on 25-line terminal it's just impossible to know anything about bug! it will be great to print maximum one line, i think -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

On Friday 03 March 2006 15:10, Bulat Ziganshin wrote:
it will also be great to make syntax analysis of all source files before compiling them. typical situation - after correcting program i run --make, long wait while some modules will be compiled and only after that ghc complains about some error. it's not yet feature req, just some thoughts about ideal compilation cycle: first syntax check all modules and print errors, then perform type analysis and report errors, then compile correct modules. what other haskellers think about this?
Sounds nice. But is it possible? I have no idea.
another problem is what ghc tries to print entire block when it encounters error. but this block can contain hundreds of lines! moreover, error message and line number printed at the beginning, so on 25-line terminal it's just impossible to know anything about bug! it will be great to print maximum one line, i think
25-line terminal and no scroll bar, how poor. I thought that everybody nowadays has access to screens with graphical resolutions, not? Anyway, this would be an nice option, but it should not be the default. What about compiler switch --terse? Ben

Bulat Ziganshin wrote:
Hello Simon,
Friday, March 3, 2006, 4:51:04 PM, you wrote:
is there an option to get ghc to keep going if it encounters an error building a file with --make? as in, I'd like it to continue compiling as much as it can only skipping what actually depends on the file that failed rather than completly aborting everything.
SM> Certainly possible, and the -k flag is free, too :-) Care to submit a SM> feature req?
it will also be great to make syntax analysis of all source files before compiling them. typical situation - after correcting program i run --make, long wait while some modules will be compiled and only after that ghc complains about some error. it's not yet feature req, just some thoughts about ideal compilation cycle: first syntax check all modules and print errors, then perform type analysis and report errors, then compile correct modules. what other haskellers think about this?
another problem is what ghc tries to print entire block when it encounters error. but this block can contain hundreds of lines! moreover, error message and line number printed at the beginning, so on 25-line terminal it's just impossible to know anything about bug! it will be great to print maximum one line, i think
The pretty printer has a mechanism to avoid printing too deeply in an expression when outputting error messages - you may have seen the "..." string printed when the expression gets too deep. This probably needs tweaking; if you can give us an example of an error message that's too long, we'll look into it. Cheers, Simon
participants (4)
-
Benjamin Franksen
-
Bulat Ziganshin
-
John Meacham
-
Simon Marlow