diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2011-08-03 16:22:06 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2011-08-03 16:22:06 +0100 |
commit | 9d251f5ec83be41fdc3a7f1104ea8968fa9e5ebe (patch) | |
tree | f7f4dc8bff703b3a32d565cbc3d352d1e729772e /compiler/codeGen | |
parent | 882e439b80110917b83aaaae3cf88fdb4ef3bd6a (diff) | |
download | haskell-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