Skip to content
  • Simon Peyton Jones's avatar
    Fix error-message suppress on given equalities · e0ad55f8
    Simon Peyton Jones authored
    I'd got the logic slightly wrong when reporting type errors
    for insoluble 'given' equalities.  We suppress insoluble givens
    under some circumstances (see Note [Given errors]), but we then
    suppressed subsequent 'wanted' errors because the (suppressed)
    'given' error "won".  Result: no errors at all :-(.
    
    This patch fixes it and
     - Renames TcType.isTyVarUnderDatatype to the more
       perspicuous TcType.isInsolubleOccursCheck
    
    In doing this I realise that I don't understand why we need
    to keep the insolubles partitioned out separately at all...
    but that is for another day.
    e0ad55f8