Fix #10285 by refusing to use NthCo on a newtype.
authorRichard Eisenberg <eir@cis.upenn.edu>
Thu, 23 Apr 2015 19:31:37 +0000 (15:31 -0400)
committerRichard Eisenberg <eir@cis.upenn.edu>
Fri, 24 Apr 2015 20:53:03 +0000 (16:53 -0400)
commita8d39a7255df187b742fecc049f0de6528b9acad
tree5a63e3140bfb5767c14c5e85436087465ba618de
parent6ab5da9913e4f8a8dcc8bda3c77d4e896fd67352
Fix #10285 by refusing to use NthCo on a newtype.

During this commit, I tested to make sure that CoreLint actually
catches the Core error if the typechecker doesn't.

Test case: typecheck/should_fail/T10285
compiler/coreSyn/CoreLint.hs
compiler/typecheck/TcCanonical.hs
compiler/types/Coercion.hs
testsuite/tests/typecheck/should_fail/T10285.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T10285.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T10285a.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T