When solving one Given from another, use the depth to control which way round
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 31 Dec 2014 10:21:43 +0000 (10:21 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 31 Dec 2014 10:21:43 +0000 (10:21 +0000)
commitd8d003185a4bca1a1ebbadb5111118ef37bbc83a
treef987e4878780262532478150437213aec8229f7e
parentfd97d2a77599e7f4a6e5c01bc7da9b12bd676e21
When solving one Given from another, use the depth to control which way round

See Note [Replacement vs keeping].

There's a bit further to go with this change (to report unused givens).
But it's already an improvement; see the latent bug described in the Note.
compiler/typecheck/TcInteract.hs
compiler/typecheck/TcRnTypes.hs
compiler/typecheck/TcSMonad.hs
compiler/typecheck/TcType.hs