[commit: ghc] ghc-7.6: Fix bug with reporting deprecated use of flag (Trac #7349) (e366755)

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

On branch  : ghc-7.6

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

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

commit e3667551d764232faff0e5280a1de3c1349e7c4c
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 6634efd..c1dc88d 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -2040,7 +2040,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,
@@ -2411,11 +2412,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.