
#12832: GHC infers too simplified contexts -------------------------------------+------------------------------------- Reporter: danilo2 | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple error/warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by danilo2): @simon, I understand this note (to some degree) and its motivation. In its example it makes perfect sense not to throw an overlap error and compile just fine. But in my example it is just wrong nad I dont see any reason for it (maybe I dont understand something here). Anyway – when I create: {{{ instance Run m Int where run = test }}} It could be possible that I wanted to choose the `Test IM a` as constraint. It could be possible and it would make sense here. Exactly the same sense as the second option available. Why is GHC just blindly choosing one option and throwing a very misguiding error to the user? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12832#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler