Join points can be levity-polymorphic
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 8 Mar 2017 09:39:29 +0000 (09:39 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 8 Mar 2017 11:04:09 +0000 (11:04 +0000)
commit8e053700f9357c1b9030c406130062795ae5015c
tree9263690bcdfcef449acdccca0048743ec0d79631
parentbd6681713a603bcdcf2fde9aab85b17183eefb0b
Join points can be levity-polymorphic

It's ok to have a levity-polymorphic join point, thus
   let j :: r :: TYPE l = blah
   in ...

Usually we don't allow levity-polymorphic binders, but join points
are different because they are not first class.  I updated the
invariants in CoreSyn.

This commit fixes Trac #13394.
compiler/coreSyn/CoreLint.hs
compiler/coreSyn/CoreSyn.hs
compiler/coreSyn/CoreUnfold.hs
testsuite/tests/polykinds/T13394.hs [new file with mode: 0644]
testsuite/tests/polykinds/all.T