[commit: ghc] master: Fix bug with reporting deprecated use of flag (Trac #7349) (f8c23ff)

Simon Peyton Jones <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/f8c23ff396eb3552b74d8045db28aa96ab519596

>---------------------------------------------------------------

commit f8c23ff396eb3552b74d8045db28aa96ab519596
Author: Simon Peyton Jones <[email protected]>
Date:   Mon Oct 29 23:19:32 2012 +0000

    Fix bug with reporting deprecated use of flag (Trac #7349)

>---------------------------------------------------------------

 compiler/main/DynFlags.hs |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 4cef95e..7defbe6 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -2376,7 +2376,8 @@ fFlags = [
 fLangFlags :: [FlagSpec ExtensionFlag]
 fLangFlags = [
   ( "th",                               Opt_TemplateHaskell,
-    deprecatedForExtension "TemplateHaskell" >> checkTemplateHaskellOk ),
+    \on -> deprecatedForExtension "TemplateHaskell" on 
+        >> checkTemplateHaskellOk on ),
   ( "fi",                               Opt_ForeignFunctionInterface,
     deprecatedForExtension "ForeignFunctionInterface" ),
   ( "ffi",                              Opt_ForeignFunctionInterface,
@@ -2764,11 +2765,11 @@ setPackageTrust = do
     l <- getCurLoc
     upd $ \d -> d { pkgTrustOnLoc = l }
 
-setGenDeriving :: Bool -> DynP ()
+setGenDeriving :: TurnOnFlag -> DynP ()
 setGenDeriving True  = getCurLoc >>= \l -> upd (\d -> d { newDerivOnLoc = l })
 setGenDeriving False = return ()
 
-checkTemplateHaskellOk :: Bool -> DynP ()
+checkTemplateHaskellOk :: TurnOnFlag -> DynP ()
 #ifdef GHCI
 checkTemplateHaskellOk turn_on
   | turn_on && rtsIsProfiled
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.