Last active
August 29, 2015 14:03
-
-
Save mietek/670b51267897a7d7fc0a to your computer and use it in GitHub Desktop.
GHCi 7.6.3 ignoring Foo.o
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat >Foo.hs <<EOF | |
module Foo where | |
foo :: IO () | |
foo = print "Foo" | |
EOF | |
$ ghc -Wall -c -o Foo.o Foo.hs | |
$ cat >Foo.hs <<EOF | |
module Foo where | |
foo :: IO () | |
foo = print "Not Foo" | |
EOF | |
$ ghci Foo.o | |
GHCi, version 7.6.3: 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 object (static) Foo.o ... done | |
final link ... done | |
> :l Foo | |
[1 of 1] Compiling Foo ( Foo.hs, interpreted ) | |
Ok, modules loaded: Foo. | |
> foo | |
"Not Foo" | |
> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat >Foo.hs <<EOF | |
module Foo where | |
foo :: IO () | |
foo = print "Foo" | |
EOF | |
$ ghc -Wall -c -o Foo.o Foo.hs | |
$ rm Foo.hs | |
$ ghci Foo.o | |
GHCi, version 7.6.3: 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 object (static) Foo.o ... done | |
final link ... done | |
> :l Foo | |
<command line>: | |
Could not find module `Foo' | |
Use -v to see a list of the files searched for. | |
Failed, modules loaded: none. | |
> | |
Leaving GHCi. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment