Can anyone tell me how to determine if I am using 64-bit or 32-bit Glasgow Haskell Compiler (GHC) on OS X? I have installed both 32 and 64-bit versions, and I don't know which one current
is pointing to.
⚡ pwd
/Library/Haskell
⚡ ll
bin -> current/bin
current -> ghc-7.4.2
doc -> current/doc
ghc-7.0.3
ghc-7.4.2
Furthermore...
⚡ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.4.2
... does not contain the information I am after.
Incidentally, I am running OS X Version 10.7.5 on an Intel Core i5, so I can run either, but I am trying to get yesod going...
There is a bug in the 64-bit GHC 7.4 for Mac which prevents yesod devel from working correctly. This bug has been corrected in 7.6. However, as 7.4 is still the recommended platform for development, it is advisable to install the 32-bit version of GHC.
The version number of your copy of GHC can be found by invoking ghc with the --version flag (see Verbosity options).
Go to the Apple Menu and select "About this Mac". If you have a Core Duo processor, you have a 32-bit CPU. Otherwise (Core 2 Duo, Xeon, i3, i5, i7, anything else), you have a 64-bit CPU.
Try ghc --info
, which should list the target architecture.
A more general-purpose solution would be to chase down symlinks and scripts to the actual GHC binary, and then run file
on it.
ghci and then type maxBound :: Int
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With