summaryrefslogtreecommitdiff
path: root/compiler/deSugar/Check.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2017-09-25 11:06:34 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2017-09-25 14:01:20 +0100
commitabed9bf5008baf6b3e84251fe4d07de80c532ead (patch)
treeacb9f6fdacd2aa70e8e5b6c04f30ad3487688148 /compiler/deSugar/Check.hs
parent1b476ab55be6c2c553988cc63d8e0c5473136275 (diff)
downloadhaskell-abed9bf5008baf6b3e84251fe4d07de80c532ead.tar.gz
Fix solving of implicit parameter constraints
Trac #14218 showed that we were not solving implicit-parameter constraints correctly. In particular, - A tuple constraint could "hide" an implicit-parameter wanted constraint, and that in turn could that we solved it from the wrong implicit-parameter binding. - As a special case the HasCallStack constraint (which is just short for (IP "callStack" CallStack), was getting mis-solved. The big change is to arrange that, in TcSMonad.findDict when looking for a dictionary, either when looking for a matching inert or solved dictionary, we fail for - Tuples that are hiding implicit parameters See Note [Tuples hiding implicit parameters] - HasCallStack constraints where we have not yet pushed on the call-site info See Note [Solving CallStack constraints] I also did a little refactoring * Move naturallyCoherentClass from Class to TcInteract, its sole use site. Class.hs seems like the wrong place. (And I also do not understand the reason that we need the eq/Coercible/ Typable stuff in this predicate, but I'll tackle that separately.) * Move the code that pushes call-site info onto a call stack from the "interact" part to the "canonicalise" part of the solver.
Diffstat (limited to 'compiler/deSugar/Check.hs')
0 files changed, 0 insertions, 0 deletions