Fix some casts.
authorRichard Eisenberg <rae@cs.brynmawr.edu>
Thu, 19 Jul 2018 04:16:13 +0000 (00:16 -0400)
committerRichard Eisenberg <rae@cs.brynmawr.edu>
Mon, 23 Jul 2018 14:23:11 +0000 (10:23 -0400)
commitaf624071fa063158d6e963e171280676f9c0a0b0
tree44280edcacae6538fc241e64dff37071724c1ae3
parenta606750b36862367d038813f9fe7170f93c36222
Fix some casts.

This fixes #15346, and is a team effort between Ryan Scott and
myself (mostly Ryan). We discovered two errors related to FC's
"push" rules, one in the TPush rule (as implemented in pushCoTyArg)
and one in KPush rule (it shows up in liftCoSubstVarBndr).

The solution: do what the paper says, instead of whatever random
thoughts popped into my head as I was actually implementing.

Also fixes #15419, which is actually the same underlying problem.

Test case: dependent/should_compile/T{15346,15419}.
compiler/coreSyn/CoreOpt.hs
compiler/types/Coercion.hs
testsuite/tests/dependent/should_compile/T15346.hs [new file with mode: 0644]
testsuite/tests/dependent/should_compile/T15419.hs [new file with mode: 0644]
testsuite/tests/dependent/should_compile/all.T