Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
6a65049a
Commit
6a65049a
authored
Nov 11, 2007
by
Ian Lynagh
Browse files
Turn -fprint-bind-result off by default
parent
70f9a988
Changes
3
Hide whitespace changes
Inline
Side-by-side
compiler/main/DynFlags.hs
View file @
6a65049a
...
...
@@ -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
))
...
...
docs/users_guide/flags.xml
View file @
6a65049a
...
...
@@ -517,10 +517,10 @@
<entry><option>
-fno-print-evld-with-show
</option></entry>
</row>
<row>
<entry><option>
-f
no-
print-bind-result
</option></entry>
<entry><link
linkend=
"ghci-stmts"
>
Turn o
ff
printing of binding results in GHCi
</link></entry>
<entry><option>
-fprint-bind-result
</option></entry>
<entry><link
linkend=
"ghci-stmts"
>
Turn o
n
printing of binding results in GHCi
</link></entry>
<entry>
dynamic
</entry>
<entry>
-
</entry>
<entry>
<option>
-fno-print-bind-result
</option>
</entry>
</row>
</tbody>
</tgroup>
...
...
docs/users_guide/ghci.xml
View file @
6a65049a
...
...
@@ -368,7 +368,6 @@ hello
<literal>
IO
</literal>
monad.
<screen>
Prelude> x
<
- return 42
42
Prelude> print x
42
Prelude>
...
...
@@ -380,7 +379,8 @@ Prelude>
<literal>
x
</literal>
in future statements, for example to print
it as we did above.
</para>
<para>
GHCi will print the result of a statement if and only if:
<para>
If
<option>
-fprint-bind-result
</option>
is set then
GHCi will print the result of a statement if and only if:
<itemizedlist>
<listitem>
<para>
The statement is not a binding, or it is a monadic binding
...
...
@@ -393,13 +393,8 @@ Prelude>
<literal>
Show
</literal></para>
</listitem>
</itemizedlist>
The automatic printing of binding results can be suppressed with
<option>
:set -fno-print-bind-result
</option>
(this does not
suppress printing the result of non-binding statements).
<indexterm><primary><option>
-fno-print-bind-result
</option></primary></indexterm><indexterm><primary><option>
-fprint-bind-result
</option></primary></indexterm>
.
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.
</para>
<indexterm><primary><option>
-fprint-bind-result
</option></primary></indexterm><indexterm><primary><option>
-fno-print-bind-result
</option></primary></indexterm>
.
</para>
<para>
Of course, you can also bind normal non-IO expressions
using the
<literal>
let
</literal>
-statement:
</para>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment