summaryrefslogtreecommitdiff
path: root/testsuite/tests/partial-sigs/should_fail/all.T
diff options
context:
space:
mode:
authorThomas Winant <thomas.winant@cs.kuleuven.be>2015-02-18 10:13:37 -0600
committerAustin Seipp <austin@well-typed.com>2015-02-18 19:18:49 -0600
commite9d72cefeda243d5962d0615fe7ad22ff615d134 (patch)
tree05313ea9536546845836852da4a1f54475cadfa5 /testsuite/tests/partial-sigs/should_fail/all.T
parent35d464bf54373cbe37e1e3310cc6a95f63f257f0 (diff)
downloadhaskell-e9d72cefeda243d5962d0615fe7ad22ff615d134.tar.gz
Fix #10045
Summary: SPJ's solution is to only bring the `TcId` (which includes the type) of a binder into scope when it had a non-partial type signature. Take care of this by only storing the `TcId` in `TcSigInfo` of non-partial type signatures, hence the change to `sig_poly_id :: Maybe TcId`. Only in case of a `Just` will we bring the `TcId` in scope. We still need to know the name of the binder, even when it has a partial type signature, so add a `sig_name :: Name` field. The field `sig_partial :: Bool` is no longer necessary, so reimplement `isPartialSig` in terms of `sig_poly_id`. Note that the new test case fails, but not because of a panic, but because the `Num a` constraint is missing. Adding an extra-constraints wildcard to `copy`'s signature would fix it. Test Plan: validate Reviewers: simonpj, austin Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D646 GHC Trac Issues: #10045
Diffstat (limited to 'testsuite/tests/partial-sigs/should_fail/all.T')
-rw-r--r--testsuite/tests/partial-sigs/should_fail/all.T1
1 files changed, 1 insertions, 0 deletions
diff --git a/testsuite/tests/partial-sigs/should_fail/all.T b/testsuite/tests/partial-sigs/should_fail/all.T
index 7e56d15c71..c49a36fe34 100644
--- a/testsuite/tests/partial-sigs/should_fail/all.T
+++ b/testsuite/tests/partial-sigs/should_fail/all.T
@@ -18,6 +18,7 @@ test('ScopedNamedWildcardsBad', normal, compile_fail, [''])
test('TidyClash', normal, compile_fail, [''])
# Bug
test('TidyClash2', expect_fail, compile_fail, [''])
+test('Trac10045', normal, compile_fail, [''])
test('UnnamedConstraintWildcard1', normal, compile_fail, [''])
test('UnnamedConstraintWildcard2', normal, compile_fail, [''])
test('WildcardInADT1', normal, compile_fail, [''])