Give a hint when a TH splice has a bad package key, partially fixes #10279
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Mon, 20 Apr 2015 21:02:36 +0000 (14:02 -0700)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Mon, 4 May 2015 22:20:32 +0000 (15:20 -0700)
commitbf4f3e653407d02593a69618fb199b2e2d529c92
tree09f35064cc49a9eb3f32971a5bbf0b3d110eae8b
parentf7dfcef47af9bf33837e0af3d391c45d12f17677
Give a hint when a TH splice has a bad package key, partially fixes #10279

Previously, if we got a package key in our splice, we'd give
a very unhelpful error message saying we couldn't find
a package 'base-4.7.0.1', despite there being a package with
that source package ID.  Really, we couldn't find a package with
that *key*, so clarify, and also tell the user what the real
package key is.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
compiler/main/Finder.hs
testsuite/tests/th/T10279.hs [new file with mode: 0644]
testsuite/tests/th/T10279.stderr [new file with mode: 0644]
testsuite/tests/th/all.T