
#15361: Error message displays redundant equality constraint -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler (Type | Version: 8.4.3 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: #14394 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): We can fix this issue with the following patch: {{{#!diff diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs index 95dc152..1098b1f 100644 --- a/compiler/typecheck/TcErrors.hs +++ b/compiler/typecheck/TcErrors.hs @@ -1821,7 +1821,7 @@ pp_givens givens where ppr_given herald (Implic { ic_given = gs, ic_info = skol_info , ic_env = env }) - = hang (herald <+> pprEvVarTheta gs) + = hang (herald <+> pprEvVarTheta (mkMinimalBySCs evVarPred gs)) 2 (sep [ text "bound by" <+> ppr skol_info , text "at" <+> ppr (tcl_loc env) ]) }}} (Where `pp_givens` is the function that prints out the stuff after `from the context:`.) Does this sound like a reasonable approach? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15361#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler