export things to customize ghc session

I've rebased the remainder of my patch and added another commit to make it work with 7.8.2 again.