Improve instanceCantMatch
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 24 Jul 2015 09:42:05 +0000 (10:42 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 24 Jul 2015 09:42:35 +0000 (10:42 +0100)
commit6e618d77d64255c32bef543a3f9635abce24a66d
treee23a34d02d9ddfd4abd7d64cea98cf03976a37b2
parentd53d80890f2762b78071f5d53c88dc9e6c0ca72e
Improve instanceCantMatch

When staring at instanceCantMatch I realised that it
was returning False (safe but inefficient) when it could
validly return True, on arguments like
   [Nothing,   Just Int]
   [Just Bool, Just Bool]

This patch makes it a bit cleverer.
compiler/types/InstEnv.hs