[Haskell-cafe] how to get ghci to load compiled modules in 7.8?

Evan Laforge qdunkan at gmail.com
Mon Jul 7 21:25:30 UTC 2014


I recently upgraded to 7.8.2 and I have a silly question.  How do you
get ghci to load compiled modules?  When I try this:

% cat >T.hs
module T where

x :: Int
x = 42
% ghc -c -dynamic-too T.hs
% s
T.dyn_hi  T.dyn_o   T.hi      T.hs      T.o
% ghci
GHCi, version 7.8.2: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package filepath-1.3.0.2 ... linking ... done.
Prelude> :l T
[1 of 1] Compiling T                ( T.hs, interpreted )
Ok, modules loaded: T.
*T>

It still loads the file interpreted, even though there is a .dyn_o
present.  What am I doing wrong?

This is on x86-64 OS X.


More information about the Haskell-Cafe mailing list