Determining GHC version use to compile an executable?

Simon Marlow simonmarhaskell at gmail.com
Wed Oct 10 04:01:23 EDT 2007


Don Stewart wrote:
> ravi:
>> I was wondering if there was a clever way to determine the GHC version
>> that was used to compile a particular executable. I looked in the RTS
>> flags and didn't see anything obvious, but I was wondering if I missed
>> something or if there was a clever back door. It's not a big deal if
>> there isn't but, if there is, it might help me diagnose a problem.
>>
> 
> Someting like:
> 
>     $ strings myHaskell.exe | sed -n '/^[0-9]\.[0-9]\.[0-9]/p'  
>     6.9.20070916
> 
> Might work.
> 
> E.g.:
> 
>     $ strings `which xmonad` | sed -n '/^[0-9]\.[0-9]\.[0-9]/p'  
>     6.9.20070916
> 
>     $ strings `which hmp3` | sed -n '/^[0-9]\.[0-9]\.[0-9]/p' 
>     6.6.1

With 6.8.1:

  > ./hello +RTS --info
  [("GHC RTS", "Yes")
  ,("GHC version", "6.8.0.20070919")
  ,("RTS way", "rts")
  ,("Host platform", "x86_64-unknown-linux")
  ,("Build platform", "x86_64-unknown-linux")
  ,("Target platform", "x86_64-unknown-linux")
  ,("Compiler unregisterised", "NO")
  ,("Tables next to code", "YES")
  ]

Cheers,
	Simon



More information about the Glasgow-haskell-users mailing list