[GHC] #8280: Deriving Show for Word#

#8280: Deriving Show for Word# ------------------------------------+------------------------------------- Reporter: monoidal | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- {{{ {-# LANGUAGE MagicHash #-} import GHC.Prim data A = A Word# deriving Show }}} This works in 7.6.3, but 7.7 gives {{{ Can't find interface-file declaration for data constructor GHC.Types.W# Probable cause: bug in .hi-boot file, or inconsistent .hi file Use -ddump-if-trace to get an idea of which file caused the error }}} The same file works if Word# is replaced by Int#. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8280 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8280: Deriving Show for Word# -------------------------------------+------------------------------------ Reporter: monoidal | 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: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by monoidal): * version: 7.6.3 => 7.7 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8280#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8280: Deriving Show for Word# -------------------------------------+------------------------------------ Reporter: monoidal | Owner: simonpj Type: bug | Status: new Priority: highest | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by simonpj): * owner: => simonpj * priority: normal => highest * milestone: => 7.8.1 Comment: I know what's happening here. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8280#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8280: Deriving Show for Word#
-------------------------------------+------------------------------------
Reporter: monoidal | Owner: simonpj
Type: bug | Status: new
Priority: highest | Milestone: 7.8.1
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by Simon Peyton Jones

#8280: Deriving Show for Word# ----------------------------------------------+---------------------------- Reporter: monoidal | Owner: simonpj Type: bug | Status: closed Priority: highest | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: deriving/should_run/T8280 | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ----------------------------------------------+---------------------------- Changes (by simonpj): * status: new => closed * testcase: => deriving/should_run/T8280 * resolution: => fixed Comment: Thanks for reporting this. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8280#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8280: Deriving Show for Word#
----------------------------------------------+----------------------------
Reporter: monoidal | Owner: simonpj
Type: bug | Status: closed
Priority: highest | Milestone: 7.8.1
Component: Compiler | Version: 7.7
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Test Case: deriving/should_run/T8280 | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
----------------------------------------------+----------------------------
Comment (by Simon Peyton Jones

#8280: Deriving Show for Word# ----------------------------------------------+---------------------------- Reporter: monoidal | Owner: simonpj Type: bug | Status: closed Priority: highest | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: deriving/should_run/T8280 | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ----------------------------------------------+---------------------------- Comment (by simonmar): There are a few things I'm confused about here. 1. The commit log says "make Word# a wired-in type", but actually it makes `Word` a wired-in type. (`Word#` is a primitive type) 2. Why does the example program need to know anything about `W#`, the constructor for `Word`, when it only mentioned `Word#`? 3. Why does `Word` need to be a wired-in type at all? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8280#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8280: Deriving Show for Word#
----------------------------------------------+----------------------------
Reporter: monoidal | Owner: simonpj
Type: bug | Status: closed
Priority: highest | Milestone: 7.8.1
Component: Compiler | Version: 7.7
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Test Case: deriving/should_run/T8280 | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
----------------------------------------------+----------------------------
Comment (by simonpj):
1. Sorry
2. See `Note [Deriving and unboxed types]` in `TcDeriv`. It should be a
bit longer and more explicit.
3. Grep for `wordDataCon`. I think `Word` became wired in this commit:
{{{
commit 6821c8a47c0fc61a2d989d368f926cc0ded776e9
Author: Ian Lynagh

#8280: Deriving Show for Word# ----------------------------------------------+---------------------------- Reporter: monoidal | Owner: simonpj Type: bug | Status: closed Priority: highest | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: deriving/should_run/T8280 | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ----------------------------------------------+---------------------------- Comment (by simonmar): Ok, thanks! Make sense now. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8280#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8280: Deriving Show for Word# -------------------------------------+------------------------------------- Reporter: monoidal | Owner: simonpj Type: bug | Status: closed Priority: highest | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | deriving/should_run/T10104 | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * testcase: deriving/should_run/T8280 => deriving/should_run/T10104 Comment: With Phab:D672 (#10104), `deriving/should_run/T10104` supersedes `deriving/should_run/T8280`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8280#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC