Improve the behaviour of warnIf
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 21 Apr 2016 11:58:52 +0000 (12:58 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 22 Apr 2016 09:51:54 +0000 (10:51 +0100)
commitf02af79e71f0383cf16b9d7c89691578ab77fa1c
treef2514df7d2d6376a7083209b645ad61ad26c8e50
parent8c33cd4fde89a367e427116b7c5dda019b5bf813
Improve the behaviour of warnIf

Now that warnIf takes a "reason", we can test the reason
in warnIf rather than in the caller.  Less code, and less
risk of getting the test and the reason out of sync.
compiler/rename/RnNames.hs
compiler/typecheck/Inst.hs
compiler/typecheck/TcRnMonad.hs