Determining GHC version use to compile an executable?

Don Stewart dons at galois.com
Tue Oct 9 14:50:44 EDT 2007


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


More information about the Glasgow-haskell-users mailing list