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

Daniel Cartwright chessai1996 at gmail.com
Fri Oct 26 20:16:19 UTC 2018


I am referring to the situations when someone uses 'Ptr a', but the Ptr
does not point to anything of type 'a'. If I write 'Ptr Word8', but I am
pointing to a Char, then that is not true.

On Fri, Oct 26, 2018 at 4:08 PM Sven Panne <svenpanne at gmail.com> wrote:

> Am Fr., 26. Okt. 2018 um 20:00 Uhr schrieb Daniel Cartwright <
> chessai1996 at gmail.com>:
>
>> [...] Eventually any non-user-facing functions that use 'Ptr LyingType'
>> should be switched from using 'Ptr' to 'Addr'. [...]
>>
>
> Again my question is: Why? When someone sees a "Ptr a" or "Ptr ()", it's
> blindingly obvious that this is equivalent to Addr, i.e. you need some
> additional information what that thing is pointing to or you don't care
> about what's at that location. This is not "lying", quite the opposite.
>
> You can turn the whole proposal 180 degrees around: Let's nuke "Addr" in
> favor of "Ptr a"/"Ptr ()"! :-) That would even get rid of a whole type,
> something the current proposal doesn't achieve. Addr is strictly less
> powerful than Ptr, so why keep the former?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20181026/dcd7bfca/attachment.html>


More information about the Libraries mailing list