Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determining 64-bit or 32-bit Haskell installed on Mac OS X?

Tags:

macos

haskell

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.

like image 910
djb Avatar asked Jan 24 '13 05:01

djb


People also ask

How do I find my Haskell version?

The version number of your copy of GHC can be found by invoking ghc with the --version flag (see Verbosity options).

How do I know if my Mac is 32 or 64 bit binary?

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.


2 Answers

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.

like image 160
shachaf Avatar answered Oct 21 '22 05:10

shachaf


ghci and then type maxBound :: Int

like image 36
idontgetoutmuch Avatar answered Oct 21 '22 05:10

idontgetoutmuch