Determining GHC version use to compile an executable?

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. Thanks, - Ravi

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 Cheers, Don

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
participants (3)
-
Don Stewart
-
Ravi Nanavati
-
Simon Marlow