[GHC] #11144: Custom type errors need tidying
#11144: Custom type errors need tidying -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- This is an excerpt from `testsuite/tests/typecheck/should_fail/CustomTypeErrors02.stderr`: {{{ CustomTypeErrors02.hs:17:1: error: The type 'a_aES -> a_aES' cannot be represented as an integer. When checking that ‘err’ has the inferred type err :: (TypeError ...) }}} We should tidy these types before printing. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11144> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#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: | -------------------------------------+------------------------------------- Changes (by bgamari): * differential: => Phab:D1547 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11144#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#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
#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 goldfire): `checkValidType` also sometimes see GHC-generated kinds. I've threaded a `TidyEnv` all throughout !TcValidity on my branch. So no need for you to do this. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11144#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11144: Custom type errors need tidying -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: fixed | 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: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => fixed Comment: Aha. Good. I'll just close this ticket then. Simon -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11144#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC