
#14273: Typed holes' "valid substitutions" suggestions are oblivious to type class constraints -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.3 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: #9091 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by dfeuer): Replying to [comment:5 Tritlo]:
About the missing constraint: if you add the -fshow-hole-constraints flag, you'll get a "Constraints include" part in the hole's type error message. Maybe it should be on by default? It seems that this blog post highlights that users would like to know that about the hole.
Yes please! I didn't even know this option existed. If it's not on by default (which I imagine it should be), GHC should at least suggest it every time it encounters a typed hole that has constraints. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14273#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler