Nicer error message for #3782
authorbenl@ouroborus.net <unknown>
Fri, 29 Oct 2010 06:33:20 +0000 (06:33 +0000)
committerbenl@ouroborus.net <unknown>
Fri, 29 Oct 2010 06:33:20 +0000 (06:33 +0000)
commit3a7e2b3ad24b08dd68c96421d1ef94baa9b00c92
treed3ac034d5589571e0fd2bf38bdf8f50033d1aa5e
parent723da2ed96068632ede8d1e8514dd02bbe1336ea
Nicer error message for #3782
It now says:

ghc-stage2: sorry! (this is work in progress)
  (GHC version 7.1.20101028 for i386-apple-darwin):
Vectorise.Builtins.indexBuiltin

    DPH builtin function 'sumTyCon' of size '11' is not yet implemented.
    This function does not appear in your source program, but it is needed
    to compile your code in the backend. This is a known, current limitation
    of DPH. If you want it to to work you should send mail to cvs-ghc@haskell.org
    and ask what you can do to help (it might involve some GHC hacking).

I added 'pprSorry' that behaves like 'pprPanic' except it say sorry! instead
of panic!, and doesn't ask the user to report a bug.
compiler/utils/Outputable.lhs
compiler/utils/Panic.lhs
compiler/vectorise/Vectorise/Builtins/Base.hs