[GHC] #8138: Core lint fails with error "Role incompatibility: expected N, got R"

#8138: Core lint fails with error "Role incompatibility: expected N, got R" ------------------------------------+------------------------------------- Reporter: gmainland | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: Other Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- I'm seeing a core lint error, "Role incompatibility: expected N, got R", on 333273792479695cf79a72cffa4c579d0c9deb21. The attached program will reproduce the error when compiled as: {{{ ghc -O2 -dcore-lint Role.hs }}} Note that `-O2` is required for core lint to complain. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8138 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8138: Core lint fails with error "Role incompatibility: expected N, got R" -------------------------------------+------------------------------------ Reporter: gmainland | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by goldfire): This is actually a bug in core lint, not in the code generation -- core lint doesn't consider the possibility of `(~R#)` arguments to functions, but some optimizations produce these. Patch on the way... If this is holding you up at the moment, just delete line 404 of !CoreLint.lhs "` ; checkRole co Nominal role`". -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8138#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8138: Core lint fails with error "Role incompatibility: expected N, got R"
-------------------------------------+------------------------------------
Reporter: gmainland | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: Other | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by Richard Eisenberg

#8138: Core lint fails with error "Role incompatibility: expected N, got R"
-------------------------------------+------------------------------------
Reporter: gmainland | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: Other | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by Richard Eisenberg

#8138: Core lint fails with error "Role incompatibility: expected N, got R" -------------------------------------+------------------------------------- Reporter: gmainland | Owner: Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Easy (less than 1 Test Case: | hour) deriving/should_compile/T8138 | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Changes (by goldfire): * status: new => merge * difficulty: Unknown => Easy (less than 1 hour) * testcase: => deriving/should_compile/T8138 Comment: Thanks for reporting this! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8138#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8138: Core lint fails with error "Role incompatibility: expected N, got R" -------------------------------------+------------------------------------- Reporter: gmainland | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Easy (less than 1 Test Case: | hour) deriving/should_compile/T8138 | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Changes (by goldfire): * status: merge => closed * resolution: => fixed Comment: Oops -- just noticed that I flagged this as "merge" instead of closed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8138#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC