[GHC] #13929: GHC panic with levity polymorphism
GHC
ghc-devs at haskell.org
Thu Sep 14 20:22:34 UTC 2017
#13929: GHC panic with levity polymorphism
-------------------------------------+-------------------------------------
Reporter: vagarenko | Owner: (none)
Type: bug | Status: new
Priority: high | Milestone: 8.2.2
Component: Compiler | Version: 8.2.1-rc2
Resolution: | Keywords: TypeInType,
| LevityPolymorphism
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by vagarenko):
Replying to [comment:10 Ben Gamari <ben@…>]:
Can you please elaborate why you think GHC should reject this.
This error message doesn't say much
{{{
T13929.hs:29:27: error:
A levity-polymorphic type is not allowed here:
Type: GUnboxed f rf
Kind: TYPE rf
In the type of expression: gunbox x
T13929.hs:29:37: error:
A levity-polymorphic type is not allowed here:
Type: GUnboxed g rg
Kind: TYPE rg
In the type of expression: gunbox y
}}}
As I mentioned in comment 8:
>>To be clear, I don't think (although could be wrong) this program should
compile; afterall, the type of gunbox requires that we represent a levity
polymorphic result, which we cannot do. Hence, the real bug here is the
panic instead of a proper type error.
>I think levity polymorphism paper says you can't have functions with
levity-polymorphic parameters, levity-polymorphic results are OK.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13929#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list