--make keep going?
Simon Marlow
simonmarhaskell at gmail.com
Thu Mar 9 08:48:29 EST 2006
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
More information about the Glasgow-haskell-users
mailing list