diff options
author | Simon Marlow <marlowsd@gmail.com> | 2014-09-02 09:01:45 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2014-09-29 14:39:42 +0100 |
commit | aeb9c936076da2536310c5aee0234270186f54b5 (patch) | |
tree | 6256e9f4b56d7864987242ed21c6a484c455c066 /docs | |
parent | e97234ddeed54c41b0c706b6b3bf6f236e451c7d (diff) | |
download | haskell-aeb9c936076da2536310c5aee0234270186f54b5.tar.gz |
Document that -dynamic is needed for loading compiled code into GHCi
Diffstat (limited to 'docs')
-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 |