use `cabal freeze`
use ghc specific cabal.config

e.g.

ghc-7.6.3: cabal_freeze/cabal-7.6.3.config =[cp]=> config.cabal
ghc-7.8.3: cabal_freeze/cabal-7.8.3.config =[cp]=> config.cabal
Merge branch 'cabal-freeze'