[GHC] #10481: raise# should have an open kind in its return type

#10481: raise# should have an open kind in its return type -------------------------------------+------------------------------------- Reporter: gridaphobe | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.11 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- I noticed this while working on https://phabricator.haskell.org/D861. `error` has a wired-in type {{{#!hs error :: forall (a :: OpenKind). String -> a }}} and an implementation {{{#!hs error :: String -> a error s = raise# (errorCallException s) }}} But GHC will actually reject the definition of `error` if you check it against the wired-in type as `raise#` has a lifted kind. The only reason we can compile `base` is that open kinds cannot be expressed in Haskell source, so when GHC compiles `GHC.Err` it thinks `error` has a lifted kind, but for every other module it uses the wired-in type with an open kind. I'm marking this as low priority because I don't see how it could affect anyone outside of GHC developers, since open kinds aren't expressible in the source language. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10481 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10481: raise# should have an open kind in its return type -------------------------------------+------------------------------------- Reporter: gridaphobe | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by simonpj): * priority: low => normal * milestone: => 7.12.1 Comment: No, it can affect anyone: {{{ {-# LANGUAGE MagicHash #-} module Foo where import GHC.Prim f :: Int -> Int# f x = raise# x }}} This wrongly yields {{{ Kind incompatibility when matching types: b0 :: * Int# :: # In the expression: raise# x In an equation for ‘f’: f x = raise# x }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10481#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10481: raise# should have an open kind in its return type -------------------------------------+------------------------------------- Reporter: gridaphobe | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1116 -------------------------------------+------------------------------------- Changes (by rwbarton): * differential: => Phab:D1116 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10481#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10481: raise# should have an open kind in its return type
-------------------------------------+-------------------------------------
Reporter: gridaphobe | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.12.1
Component: Compiler | Version: 7.11
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions: Phab:D1116
-------------------------------------+-------------------------------------
Comment (by Reid Barton

#10481: raise# should have an open kind in its return type -------------------------------------+------------------------------------- Reporter: gridaphobe | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1116 -------------------------------------+------------------------------------- Changes (by rwbarton): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10481#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10481: raise# should have an open kind in its return type -------------------------------------+------------------------------------- Reporter: gridaphobe | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | primops/should_run/T10481 Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1116 -------------------------------------+------------------------------------- Changes (by simonpj): * testcase: => primops/should_run/T10481 Comment: Thanks; don't forget to fill in the Test Case field though. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10481#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC