Skip to content

RFC: export WordPtr from Data.Word and IntPtr from Data.Int rather than only from Foreign.Ptr

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.

Edited by Carter Schonwald
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information