[GHC] #15200: RFC: export WordPtr from Data.Word and IntPtr from Data.Int rather than only from Foreign.Ptr

#15200: RFC: export WordPtr from Data.Word and IntPtr from Data.Int rather than only from Foreign.Ptr -------------------------------------+------------------------------------- Reporter: carter | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.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: -------------------------------------+------------------------------------- Currently we have two types (WordPtr and IntPtr) that should live / be exposed from Data.Word and Data.Int respectively that currently are not reasons for the inclusion 1) It seems odd to have Word and Int types in base that public types but aren't exposed by the name sake modules 2) more broadly: while GHC and much extent haskell code makes the strong assumption systematically that Pointers/memory addresses are the same size as Word/Int, this is not guaranteed by haskell 2010 OR the FFI addendum https://www.haskell.org/onlinereport/haskell2010/haskellch8.html thusly, adding WordPtr and IntPtr to the standard on the haskell side is part of a small list of goals i have for inclusion in haskell 2020. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15200 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15200: RFC: export WordPtr from Data.Word and IntPtr from Data.Int rather than only from Foreign.Ptr -------------------------------------+------------------------------------- Reporter: carter | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.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: | -------------------------------------+------------------------------------- Description changed by carter: Old description:
Currently we have two types (WordPtr and IntPtr) that should live / be exposed from Data.Word and Data.Int respectively that currently are not
reasons for the inclusion
1) It seems odd to have Word and Int types in base that public types but aren't exposed by the name sake modules
2) more broadly: while GHC and much extent haskell code makes the strong assumption systematically that Pointers/memory addresses are the same size as Word/Int, this is not guaranteed by haskell 2010 OR the FFI addendum https://www.haskell.org/onlinereport/haskell2010/haskellch8.html
thusly, adding WordPtr and IntPtr to the standard on the haskell side is part of a small list of goals i have for inclusion in haskell 2020.
New description: Currently we have two types (WordPtr and IntPtr) that should live / be exposed from Data.Word and Data.Int respectively that currently are not reasons for the inclusion 1) It seems odd to have Word and Int types in base that area public types but aren't exposed by the name sake modules 2) more broadly: while GHC and much extent haskell code makes the strong assumption systematically that Pointers/memory addresses are the same size as Word/Int, this is not guaranteed by haskell 2010 OR the FFI addendum https://www.haskell.org/onlinereport/haskell2010/haskellch8.html thusly, adding WordPtr and IntPtr to the standard on the haskell side is part of a small list of goals i have for inclusion in haskell 2020. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15200#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15200: RFC: export WordPtr from Data.Word and IntPtr from Data.Int rather than only from Foreign.Ptr -------------------------------------+------------------------------------- Reporter: carter | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.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: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): I can't comment about Haskell 2020, but it seems quite reasonable to reexport `IntPtr` and `WordPtr` from `Data.Int` and `Data.Word`, respectively. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15200#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15200: RFC: export WordPtr from Data.Word and IntPtr from Data.Int rather than only from Foreign.Ptr -------------------------------------+------------------------------------- Reporter: carter | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.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: | -------------------------------------+------------------------------------- Comment (by carter): (my context wrt h2020 is that i'm on that committee, but good to hear positive feedback from the libraries committee) once i get master in better shape locally, i'll throw a patch up on phab -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15200#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC