Proposal: Move primitive-Data.Primitive.Addr API into base

Sven Panne svenpanne at gmail.com
Fri Oct 26 17:26:33 UTC 2018


Am Fr., 26. Okt. 2018 um 06:05 Uhr schrieb Carter Schonwald <
carter.schonwald at gmail.com>:

> [...] I guess I’m just trying to say “what would the impact on base, if
> every fake Ptr was moved to be Addr?” Because it’s not something which
> should be done by halves.
>
> 1) [...]
>
> 2) [...]
>
> 3). [...]
>

The most important question is missing from this list: What are the
benefits of touching such a crucial part of our API ecosystem? There should
better be extremely good reasons, otherwise lots of annoying work and
incompatibility is generated for nothing. Reading through this thread, I
haven't seen a good motivation for touching Storable/Ptr and friends.
Perhaps I have misunderstood what the actual proposal is, initially I
thought it is just replacing various "Ptr foo" with Addr only within GHC
itself. That's fine, but the scope seems to have broadened.

Just a historical remark: Addr# is a GHCism, and so was Addr. At the time
the FFI came up, Ptr was intended to be the portable type. So yes, "Ptr a"
and "Ptr ()" are basically just Addr (modulo casts), but intentionally so.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20181026/c2e41ad3/attachment.html>


More information about the Libraries mailing list