function definition or expression in the program. When the function
is called, or the expression evaluated, GHCi suspends
execution and returns to the prompt, where you can inspect the
function definition or expression in the program. When the function
is called, or the expression evaluated, GHCi suspends
execution and returns to the prompt, where you can inspect the
<para>The execution continued at the point it previously stopped, and has
now stopped at the breakpoint for a second time.</para>
<para>The execution continued at the point it previously stopped, and has
now stopped at the breakpoint for a second time.</para>
<title>Setting breakpoints</title>
<para>Breakpoints can be set in various ways. Perhaps the easiest way to
<title>Setting breakpoints</title>
<para>Breakpoints can be set in various ways. Perhaps the easiest way to
<title>Listing and deleting breakpoints</title>
<para>The list of breakpoints currently enabled can be displayed using
<title>Listing and deleting breakpoints</title>
<para>The list of breakpoints currently enabled can be displayed using
<para>Most of the command-line options accepted by GHC (see <xref
linkend="using-ghc"/>) also make sense in interactive mode. The ones
<para>Most of the command-line options accepted by GHC (see <xref
linkend="using-ghc"/>) also make sense in interactive mode. The ones
- that don't make sense are mostly obvious; for example, GHCi
- doesn't generate interface files, so options related to interface
- file generation won't have any effect.</para>
+ that don't make sense are mostly obvious.</para>
- ___ ___ _
- / _ \ /\ /\/ __(_)
- / /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98.
-/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
-\____/\/ /_/\____/|_| Type :? for help.
-
+GHCi, version 6.8.1: http://www.haskell.org/ghc/ :? for help
<literal>:cmd</literal> <replaceable>expr</replaceable>
<indexterm><primary><literal>:cmd</literal></primary></indexterm>
</term>
<literal>:cmd</literal> <replaceable>expr</replaceable>
<indexterm><primary><literal>:cmd</literal></primary></indexterm>
</term>
<literal>:ctags</literal> <optional><replaceable>filename</replaceable></optional>
<literal>:etags</literal> <optional><replaceable>filename</replaceable></optional>
<indexterm><primary><literal>:etags</literal></primary>
<literal>:ctags</literal> <optional><replaceable>filename</replaceable></optional>
<literal>:etags</literal> <optional><replaceable>filename</replaceable></optional>
<indexterm><primary><literal>:etags</literal></primary>
no filename is specified, the defaulit <filename>tags</filename> or
<filename>TAGS</filename> is
used, respectively. Tags for all the functions, constructors and
no filename is specified, the defaulit <filename>tags</filename> or
<filename>TAGS</filename> is
used, respectively. Tags for all the functions, constructors and
<literal>:force <replaceable>identifier</replaceable> ...</literal>
<indexterm><primary><literal>:force</literal></primary></indexterm>
</term>
<literal>:force <replaceable>identifier</replaceable> ...</literal>
<indexterm><primary><literal>:force</literal></primary></indexterm>
</term>
However, we cannot simply pass the arguments to the
<literal>main</literal> function while we are testing in ghci,
as the <literal>main</literal> function doesn't take its
However, we cannot simply pass the arguments to the
<literal>main</literal> function while we are testing in ghci,
as the <literal>main</literal> function doesn't take its
<listitem>
<para>Prints a value without forcing its evaluation.
<literal>:print</literal> may be used on values whose types are
<listitem>
<para>Prints a value without forcing its evaluation.
<literal>:print</literal> may be used on values whose types are
variables with polymorphic types at a breakpoint. While inspecting
the runtime value, <literal>:print</literal> attempts to
reconstruct the type of the value, and will elaborate the type in
variables with polymorphic types at a breakpoint. While inspecting
the runtime value, <literal>:print</literal> attempts to
reconstruct the type of the value, and will elaborate the type in