Skip to content
  • Simon Peyton Jones's avatar
    Make out-of-scope errors more prominent · 08003e7f
    Simon Peyton Jones authored
    Generally, when the type checker reports an error, more serious
    ones suppress less serious ones.
    
    A "variable out of scope" error is arguably the most serious of all,
    so this patch moves it to the front of the list instead of the end.
    
    This patch also fixes Trac #14149, which had
    -fdefer-out-of-scope-variables, but also had a solid type error.
    As things stood, the type error was not reported at all, and
    compilation "succeeded" with error code 0.  Yikes.
    
    Note that
    
    - "Hole errors" (including out of scope) are never suppressed.
      (maybeReportHoleError vs maybeReportError in TcErorrs)
      They can just get drowned by the noise.
    
    - But with the new orientation, out of scope errors will suppress
      type errors.  That would be easy to change.
    08003e7f