Many warnings and errors issued by GHC can be fixed semi-automatically.
- An unused variable warning can be fixed by prefixing the variable with
- Missing type signatures can be added automatically, but the user might
want to review the naming of type variables.
- Errors that complain about a LANGUAGE pragma can be fixed, e.g.,
PatternGuards, TypeSynonymInstances, etc.. The suggested pragma might not
always be the best choice, though, e.g., ExistentialTypes vs.
- Some weird errors without helpful messages could be improved this way,
too. E.g., adding the CPP pragma if the parser barfs on a #ifdef line.
GHC could be improved to use different types or constructors for different
error messages so error messages need not be matched with regexps.