rearrange ghc+cabal install in a shell script