[GHC] #11465: Eliminate check_lifted check in TcValidity

#11465: Eliminate check_lifted check in TcValidity -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- In `TcValidity`, when checking for valid types, we had a long-standing test, embodied in a local function called `check_lifted`, which checked that a number of places had a lifted type of kind `*` and not an unlifted one of kind `#`. But that test is out-dated now; the kind system does the job. So this ticket is to remove the `check_lifted` test. See the discussion in #11120, starting at comment:19. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11465 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11465: Eliminate check_lifted check in TcValidity -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * cc: RyanGlScott (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11465#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11465: Eliminate check_lifted check in TcValidity -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1807 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * differential: => Phab:D1807 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11465#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11465: Eliminate check_lifted check in TcValidity -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1807 Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Things seem to work about as one would expect with Phab:D1807. However, this error could use a bit of work, {{{ λ> :set -XTypeInType -XDataKinds -XKindSignatures -XMagicHash λ> import GHC.Exts λ> class Eq Char# where (==) = undefined <interactive>:3:10: error: Unexpected type ‘Char#’ In the class declaration for ‘Eq’ A class declaration should have form class Eq a where ... }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11465#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11465: Eliminate check_lifted check in TcValidity -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1807 Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Actually I have a patch ready to go... will commit tomorrow -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11465#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11465: Eliminate check_lifted check in TcValidity
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1807
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#11465: Eliminate check_lifted check in TcValidity -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1807 Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11465#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11465: Eliminate check_lifted check in TcValidity -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1807 Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Re comment:3, the error message looks fine. I think you meant `instance Eq Char#`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11465#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11465: Eliminate check_lifted check in TcValidity -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1807 Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Oh dear, indeed I did. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11465#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11465: Eliminate check_lifted check in TcValidity
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.3
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1807
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#11465: Eliminate check_lifted check in TcValidity -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 7.10.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1807 Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * milestone: => 8.2.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11465#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11465: Eliminate check_lifted check in TcValidity -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 7.10.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1807 Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): The test case for this was as follows {{{ class BoxIt (a :: TYPE 'Unlifted) where type Boxed a :: * boxed :: a -> Boxed a instance BoxIt Char# where type Boxed Char# = Char boxed x = C# x main :: IO () main = print $ boxed 'c'# }}} After refactoring the levity stuff as per #11471, this test failed (of course). But as I look at it, it's amazing that it ever worked. The width to the argument of `boxed` is entirely unknowable. Anyway, it's all much better now. :) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11465#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11465: Eliminate check_lifted check in TcValidity -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 7.10.3 Resolution: fixed | Keywords: | LevityPolymorphism Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1807 Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * keywords: => LevityPolymorphism Comment: Adding a keyword so we can find it when we write a paper about levity polymorphism! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11465#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC