More comments on role subtyping, unsoundness fix.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Mon, 27 Feb 2017 04:15:30 +0000 (20:15 -0800)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Thu, 2 Mar 2017 23:58:16 +0000 (15:58 -0800)
commit4aada7a6c13752652cfce5e04f015a8909553917
treeb1cb067394e98218d568951c20f8b48cd28e6877
parentf56fc7f7fe72f96348d663a83f736c4c8b12b08b
More comments on role subtyping, unsoundness fix.

Summary:
- We incorrectly allowed subroling on injective data in
  some cases. There is now a test to check for this case, and a Note.

- More commentary on how the subtyping with roles works.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate

Reviewers: goldfire, austin, simonpj, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D3222
compiler/typecheck/TcRnDriver.hs
testsuite/tests/backpack/should_fail/all.T
testsuite/tests/backpack/should_fail/bkpfail44.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail44.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail45.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail45.stderr [new file with mode: 0644]