From: Ian Lynagh Date: Sun, 11 Nov 2007 00:11:26 +0000 (+0000) Subject: Turn -fprint-bind-result off by default X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=6a65049a2b80e42ec44ebd775be98a70101ac495 Turn -fprint-bind-result off by default --- diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 3ef66cb..2603c85 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -524,27 +524,25 @@ defaultDynFlags = pkgDatabase = Nothing, pkgState = panic "no package state yet: call GHC.setSessionDynFlags", haddockOptions = Nothing, - flags = [ - Opt_ReadUserPackageConf, - - Opt_MonoPatBinds, -- Experimentally, I'm making this non-standard - -- behaviour the default, to see if anyone notices - -- SLPJ July 06 + flags = [ + Opt_ReadUserPackageConf, - Opt_ImplicitPrelude, - Opt_MonomorphismRestriction, + Opt_MonoPatBinds, -- Experimentally, I'm making this non-standard + -- behaviour the default, to see if anyone notices + -- SLPJ July 06 + + Opt_ImplicitPrelude, + Opt_MonomorphismRestriction, + + Opt_DoAsmMangling, - Opt_DoAsmMangling, - Opt_GenManifest, - Opt_EmbedManifest, - - -- on by default: - Opt_PrintBindResult ] - ++ [f | (ns,f) <- optLevelFlags, 0 `elem` ns] - -- The default -O0 options - ++ standardWarnings, - + Opt_EmbedManifest + ] + ++ [f | (ns,f) <- optLevelFlags, 0 `elem` ns] + -- The default -O0 options + ++ standardWarnings, + log_action = \severity srcSpan style msg -> case severity of SevInfo -> hPutStrLn stderr (show (msg style)) diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml index 76d9829..4a900b6 100644 --- a/docs/users_guide/flags.xml +++ b/docs/users_guide/flags.xml @@ -517,10 +517,10 @@ - - Turn off printing of binding results in GHCi + + Turn on printing of binding results in GHCi dynamic - - + diff --git a/docs/users_guide/ghci.xml b/docs/users_guide/ghci.xml index b092953..bac55ed 100644 --- a/docs/users_guide/ghci.xml +++ b/docs/users_guide/ghci.xml @@ -368,7 +368,6 @@ hello IO monad. Prelude> x <- return 42 -42 Prelude> print x 42 Prelude> @@ -380,7 +379,8 @@ Prelude> x in future statements, for example to print it as we did above. - GHCi will print the result of a statement if and only if: + If is set then + GHCi will print the result of a statement if and only if: The statement is not a binding, or it is a monadic binding @@ -393,13 +393,8 @@ Prelude> Show - The automatic printing of binding results can be suppressed with - (this does not - suppress printing the result of non-binding statements). - . - You might want to do this to prevent the result of binding - statements from being fully evaluated by the act of printing - them, for example. + . + Of course, you can also bind normal non-IO expressions using the let-statement: