diff options
-rw-r--r-- | docs/users_guide/ghci.xml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/users_guide/ghci.xml b/docs/users_guide/ghci.xml index 729f96f244..cbf5b764a1 100644 --- a/docs/users_guide/ghci.xml +++ b/docs/users_guide/ghci.xml @@ -226,7 +226,7 @@ Ok, modules loaded: Main. </screen> <para>We can compile D, then load the whole program, like this:</para> <screen> -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 |