Skip to content

Clarify the decision behind the HWND/HANDLE/Ptr() type synonyms #44

@expipiplus1

Description

@expipiplus1

I was surprised to find that these aren't the definitions for HWND and HANDLE

newtype HWND = HWND { unsafeHWNDToHANDLE :: HANDLE }

newtype HANDLE = HANDLE { unsafeHANDLEToPtr :: Ptr () }

I'm not an expert in Win32 programming, but I don't think that conversions between these three types are so pervasive (and without consequence) as to necessitate using synonyms here rather than something which protects the programmer a little more. If this is required, it would be great to document the declarations with this information, if not then perhaps there could be a major version update replacing the synonyms.

The same thing could probably be said for any of the other type synonyms of HANDLE in Win32.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions