
#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 Tritlo): Ah, I see where the problem lies. It wraps the hole with the constraints from the implications from the context, but in this case, it is the `show` function which imposes new constraints on the hole, but as you say, this is not reflected in the type of the hole (i.e. the subtype checker is checking whether `forall a. Num a => a -> a -> a` fits the hole of type `Show a => a0_a1m3[tau:2]`, where (as we can see), the mentioned `a` is not `a0_a1m3[tau:2]`, which is the ambiguous type variable in question. I'll get to work on fixing that. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14273#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler