summaryrefslogtreecommitdiff
path: root/compiler/codeGen
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-08-03 16:22:06 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2011-08-03 16:22:06 +0100
commit9d251f5ec83be41fdc3a7f1104ea8968fa9e5ebe (patch)
treef7f4dc8bff703b3a32d565cbc3d352d1e729772e /compiler/codeGen
parent882e439b80110917b83aaaae3cf88fdb4ef3bd6a (diff)
downloadhaskell-9d251f5ec83be41fdc3a7f1104ea8968fa9e5ebe.tar.gz
Fix a grevious error in InstEnv: Trac #5095
An claimed short-cut optimisation was actually an error. The optimisation was this: when looking up (C a b), where 'a' and 'b' are type variables, we were returning [] immediately if the instance environment had no instances of form (C a b). Why? Because the thing being looked up definitely won't match (C Int Bool), say. BUT it will *unify* with (C Int Bool) and we care very much about things it might unify with. If we neglect them we may silently allow incoherent instance selection, and that is exactly what happened in #5095. The fix is easy: remove the "optimisation".
Diffstat (limited to 'compiler/codeGen')
0 files changed, 0 insertions, 0 deletions