Skip to content
  • Simon Peyton Jones's avatar
    Tidy user type errors in checkValidType · 67565a72
    Simon Peyton Jones authored
    Trac #11144 showed that we need to tidy the type in the error message
    generated in TcValidity.checkUserTypeError.
    
    This is still unsatisfactory.  checkValidType was originally supposed
    to be called only on types gotten directly from user-written HsTypes.
    So its error messages do no tidying.  But TcBinds calls it checkValidType
    on an /inferred/ type, which may need tidying.
    
    Still this at least fixes the bad error message in CustomTypeErrors02,
    which was the original ticket.
    
    Some other small refactorings:
    
    * Remove unused Kind result of getUserTypeErrorMsg
    * Rename isUserErrorTy  -->   userTypeError_maybe
    67565a72