Fix #9438 by converting a panic to an error message
authorRyan Scott <ryan.gl.scott@gmail.com>
Fri, 13 Apr 2018 15:33:54 +0000 (11:33 -0400)
committerBen Gamari <ben@smart-cactus.org>
Fri, 13 Apr 2018 15:33:59 +0000 (11:33 -0400)
commit7613a812888424b49cb334a4e63bd7280adf2774
tree2a9f67a3283a9f69fc4dc77e0867aab36ef65f0a
parent6f6230308fda376c55cb7cbcd4b6b51b680d4cef
Fix #9438 by converting a panic to an error message

Previously, GHC was quite eager to panic whenever it was fed
an archive file when `DYNAMIC_GHC_PROGRAMS=YES`. This ought to be an
explicit error message instead, so this patch accomplishes just that.

Test Plan: make test TEST=T14708

Reviewers: Phyx, hvr, bgamari

Reviewed By: Phyx

Subscribers: thomie, carter

GHC Trac Issues: #9438, #14708, #15032

Differential Revision: https://phabricator.haskell.org/D4589
compiler/ghci/Linker.hs
testsuite/.gitignore
testsuite/tests/ghci/linking/Makefile
testsuite/tests/ghci/linking/T14708.hs [new file with mode: 0644]
testsuite/tests/ghci/linking/T14708.stderr [new file with mode: 0644]
testsuite/tests/ghci/linking/add.c [new file with mode: 0644]
testsuite/tests/ghci/linking/all.T