[GHC] #14434: GHC 8.2.1 picks wrong instances with -O in a presence of an OVERLAPPABLE instance
GHC
ghc-devs at haskell.org
Wed Nov 8 11:18:16 UTC 2017
#14434: GHC 8.2.1 picks wrong instances with -O in a presence of an OVERLAPPABLE
instance
-------------------------------------+-------------------------------------
Reporter: dredozubov | Owner: (none)
Type: bug | Status: new
Priority: high | Milestone: 8.2.3
Component: Compiler | Version: 8.2.1
Resolution: | Keywords:
Operating System: Linux | Architecture: x86_64
Type of failure: Incorrect result | (amd64)
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones <simonpj@…>):
In [changeset:"30058b0e45e920319916be999de9c4d77da136e7/ghc"
30058b0e/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="30058b0e45e920319916be999de9c4d77da136e7"
Fix another dark corner in the shortcut solver
The shortcut solver for type classes (Trac #12791) was eagerly
solving a constaint from an OVERLAPPABLE instance. It happened
to be the only one in scope, so it was unique, but since it's
specfically flagged as overlappable it's really a bad idea to
solve using it, rather than using the Given dictionary.
This led to Trac #14434, a nasty and hard to identify bug.
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14434#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list