Skip to content
  • Simon Peyton Jones's avatar
    Suppress error cascade in record fields · cb767542
    Simon Peyton Jones authored
    When a record contruction or pattern uses a data constructor
    that isn't in scope, we may produce spurious ambiguous-field
    errors (Trac #14307).  E.g.
    
       f (A { fld = x }) = e
    
    where 'A' is not in scope.  We want to draw attention to the
    out-of-scope data constructor first; once that is fixed we
    can think about the fields.
    
    This patch suppresses the field errors if the data con is out
    of scope.
    cb767542