Commit aeb9c936 authored by Simon Marlow's avatar Simon Marlow
Browse files

Document that -dynamic is needed for loading compiled code into GHCi

parent e97234dd
......@@ -226,7 +226,7 @@ Ok, modules loaded: Main.
<para>We can compile D, then load the whole program, like this:</para>
Prelude> :! ghc -c D.hs
Prelude> :! ghc -c -dynamic D.hs
Prelude> :load A
Compiling B ( B.hs, interpreted )
Compiling C ( C.hs, interpreted )
......@@ -241,6 +241,11 @@ Ok, modules loaded: A, B, C, D.
because the source and everything it depends on
is unchanged since the last compilation.</para>
<para>Note the <literal>-dynamic</literal> flag to GHC: GHCi uses
dynamically-linked object code (if you are on a platform that
supports it), and so in order to use compiled code with GHCi it
must be compiled for dynamic linking.</para>
<para>At any time you can use the command
<literal>:show modules</literal>
to get a list of the modules currently loaded
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment