[GHC] #13115: missing data instances for IntPtr and WordPtr in base
#13115: missing data instances for IntPtr and WordPtr in base -------------------------------------+------------------------------------- Reporter: carter | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 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: -------------------------------------+------------------------------------- as Defined in Foreign.Ptr -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13115> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13115: missing data instances for IntPtr and WordPtr in base -------------------------------------+------------------------------------- Reporter: carter | Owner: (none) Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 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): * status: new => infoneeded Comment: Can you elaborate? What instances are missing? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13115#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13115: missing data instances for IntPtr and WordPtr in base -------------------------------------+------------------------------------- Reporter: carter | Owner: (none) Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 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: | -------------------------------------+------------------------------------- Comment (by carter): I think I meant the Data Type class -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13115#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13115: missing data instances for IntPtr and WordPtr in base -------------------------------------+------------------------------------- Reporter: carter | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer 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): * keywords: => newcomer * status: infoneeded => new Comment: Ah, OK. Thanks for clarifying! I don't think this would be too hard to accomplish, if someone wants to volunteer a patch. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13115#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13115: missing data instances for IntPtr and WordPtr in base -------------------------------------+------------------------------------- Reporter: carter | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer 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 sighingnow): Replying to [comment:3 RyanGlScott]:
Ah, OK. Thanks for clarifying!
I don't think this would be too hard to accomplish, if someone wants to volunteer a patch.
Hi, I am a newcomer to ghc-devs mailing list and I volunteer to fix this issue. Since base-4.10.0.0, the `IntPtr` and `WordPtr` are defined using `newtype` rather than `data` (as in base-4.9.1.0), is it enough for this issue that putting the following instance declarations to `Data.Data` module (with `GeneralizedNewtypeDeriving` enabled) ? {{{#!haskell deriving instance Data IntPtr deriving instance Data WordPtr }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13115#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13115: missing data instances for IntPtr and WordPtr in base -------------------------------------+------------------------------------- Reporter: carter | Owner: sighingnow Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer 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): * owner: (none) => sighingnow Comment: Replying to [comment:4 sighingnow]:
Hi, I am a newcomer to ghc-devs mailing list and I volunteer to fix this issue.
Wonderful!
Since base-4.10.0.0, the `IntPtr` and `WordPtr` are defined using `newtype` rather than `data` (as in base-4.9.1.0), is it enough for this issue that putting the following instance declarations to `Data.Data` module (with `GeneralizedNewtypeDeriving` enabled) ?
{{{#!haskell deriving instance Data IntPtr
deriving instance Data WordPtr }}}
Yes, I think that would work quite nicely. Feel free to ask any more questions here if they arise. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13115#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13115: missing data instances for IntPtr and WordPtr in base -------------------------------------+------------------------------------- Reporter: carter | Owner: sighingnow Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer 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 bgamari): I actually don't know that you need `GeneralizedNewtypeDeriving` here. The usual `DeriveDataTypeable` should do just fine I believe. Otherwise, yes. It looks like you have the right idea. Do make sure to add `@since` annotations in the Haddock documentation for the new instances. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13115#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13115: missing data instances for IntPtr and WordPtr in base -------------------------------------+------------------------------------- Reporter: carter | Owner: sighingnow Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer 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 sighingnow): Thanks for your help. I have push a diff here Phab:D3938 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13115#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13115: missing data instances for IntPtr and WordPtr in base -------------------------------------+------------------------------------- Reporter: carter | Owner: sighingnow Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3938 Wiki Page: | -------------------------------------+------------------------------------- Changes (by sighingnow): * differential: => Phab:D3938 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13115#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13115: missing data instances for IntPtr and WordPtr in base -------------------------------------+------------------------------------- Reporter: carter | Owner: sighingnow Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3938 Wiki Page: | -------------------------------------+------------------------------------- Comment (by sighingnow): Could anyone help me with the build failure of Phab:D3938 ? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13115#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13115: missing data instances for IntPtr and WordPtr in base -------------------------------------+------------------------------------- Reporter: carter | Owner: sighingnow Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3938 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13115#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13115: missing data instances for IntPtr and WordPtr in base -------------------------------------+------------------------------------- Reporter: carter | Owner: sighingnow Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3938 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"cbd491170818070aeb7edd8c547a2f0bfa891bf1/ghc" cbd4911/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="cbd491170818070aeb7edd8c547a2f0bfa891bf1" Make IntPtr and WordPtr as instance of Data.Data typeclass, fix #13115 Test Plan: ./validate Reviewers: austin, hvr, bgamari, RyanGlScott Reviewed By: RyanGlScott Subscribers: RyanGlScott, rwbarton, thomie GHC Trac Issues: #13115 Differential Revision: https://phabricator.haskell.org/D3938 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13115#comment:11> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13115: missing data instances for IntPtr and WordPtr in base -------------------------------------+------------------------------------- Reporter: carter | Owner: sighingnow Type: bug | Status: closed Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3938 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed * milestone: => 8.4.1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13115#comment:12> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC