As Nathan points out, due to a known bug in ghc, you should run make twice in your script when building ghc. (it'll always fail with expectJust initTcInteractive the first time you try to build it fresh)
Additional, since we're already somewhat arch-specific, we should source /etc/makepkg.conf to get the makeflags instead of using just -j6 (on my system I use -j12 for example) I was wondering why my load averages were so low before I realized you set -j manually.
Runs make twice while building ghc
Due to a known bug in ghc, make will always fail with `expectJust
initTcInteractive` the first time you try to build it
MAKEFLAGS from /etc/makepkg.conf
Rather than setting them ourselves, we take the MAKEFLAGS from
the systemwide configuration (at least on Arch)