Why does ghci recompile the module compiled in different OS ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Why does ghci recompile the module compiled in different OS ?

z_axis
Both linux and freebsd has the same .ghci file.
>cat ~/.ghci
:def hoogle \str -> return $ ":! hoogle --count=15 \"" ++ str ++ "\""
:cd /media/G/www/qachina/db/doc/money

the money.hs has many functions i need to use.  

On freebsd, i use the following command to compile it:
>ghc -c -O2 money.hs
>ls
Money.hi  Money.hs  Money.o

When entering ghci, it indeed doesnot recompile the module.
>ghci
...
Ok, modules loaded: Money

However, when i use the same module in archlinux, the ghci does recompile the module:
>ghci
...
[1 of 1] Compiling Money            ( Money.hs, interpreted )
Ok, modules loaded: Money.

Any suggestion is appreciated!
e^(π.i) + 1 = 0
Reply | Threaded
Open this post in threaded view
|

Re: Why does ghci recompile the module compiled in different OS ?

Gaius Hammond
Are you trying to use the .o compiled on BSD on Linux? They are two  
different operating systems. So the Linux ghci isn't using the .o,  
it's using the .hs. Even getting Haskell binaries to run on two  
different versions of Linux can be an adventure...



http://gaiustech.wordpress.com/2010/09/03/on-deployment/



Cheers,



G




On 4 Sep 2010, at 02:36, zaxis wrote:

>
> Both linux and freebsd has the same .ghci file.
>> cat ~/.ghci
> :def hoogle \str -> return $ ":! hoogle --count=15 \"" ++ str ++ "\""
> :cd /media/G/www/qachina/db/doc/money
>
> the money.hs has many functions i need to use.
>
> On freebsd, i use the following command to compile it:
>> ghc -c -O2 money.hs
>> ls
> Money.hi  Money.hs  Money.o
>
> When entering ghci, it indeed doesnot recompile the module.
>> ghci
> ...
> Ok, modules loaded: Money
>
> However, when i use the same module in archlinux, the ghci does  
> recompile
> the module:
>> ghci
> ...
> [1 of 1] Compiling Money            ( Money.hs, interpreted )
> Ok, modules loaded: Money.
>
> Any suggestion is appreciated!
>
> -----
> e^(π⋅i) + 1 = 0
> --
> View this message in context: http://old.nabble.com/Why-does-ghci-recompile-the-module-compiled-in-different-OS---tp29619740p29619740.html
> Sent from the Haskell - Haskell-Cafe mailing list archive at  
> Nabble.com.
>
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe