Simon Peyton Jones pushed to branch wip/T23162-part2 at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • compiler/GHC/Tc/Errors.hs
    ... ... @@ -1322,8 +1322,13 @@ maybeReportError ctxt items@(item1:|_) (SolverReport { sr_important_msg = import
    1322 1322
                  -- report nothing.  (If at least one is not suppressed, do report: the function that
    
    1323 1323
                  -- generates the error message should look for an unsuppressed error item.)
    
    1324 1324
     
    
    1325
    -     | any ei_insoluble items
    
    1326
    -     = False  -- Don't suppress insolubles even if cec_suppress is True
    
    1325
    +-- It is tempting to say that we always want to see all insoluble errors
    
    1326
    +-- But then we get a bit more than we want.  Examples:
    
    1327
    +--    a ~ t a               occurs check errors (T2534, mc25)
    
    1328
    +--    T @X1 T1 ~ T @X2 T2   gives two insolubles: X1~X2 and T1~T2 (KindVType, T17380, T22332b)
    
    1329
    +--
    
    1330
    +--     | any ei_insoluble items
    
    1331
    +--     = False  -- Don't suppress insolubles even if cec_suppress is True
    
    1327 1332
     
    
    1328 1333
          | cec_suppress ctxt
    
    1329 1334
          = True   -- Some earlier error has occurred, so suppress this diagnostic