Don't let compilation failure abort cabal repl

This is a workaround for https://github.com/haskell/cabal/issues/1715 suggested
by @Philonous. Apparently this doesn't play well with autogenerating .h files,
so beware if you use this feature (most people don't).