[GHC] #11144: Custom type errors need tidying

GHC ghc-devs at haskell.org
Fri Dec 4 14:21:05 UTC 2015


#11144: Custom type errors need tidying
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.11
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D1547
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"67565a72f5bcd2edcb5775dc3879708f9d302fa8/ghc"
 67565a72/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="67565a72f5bcd2edcb5775dc3879708f9d302fa8"
 Tidy user type errors in checkValidType

 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
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11144#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list