You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do not understand the warranties, getNameInfo makes about its results.
If an argument is False, does this mean that the corresponding result is always Nothing?
Likewise, if an argument is True, does this mean that the corresponding result is always Just?
On Mon, 17 Jan 2022, Kazu Yamamoto wrote:
I'm not the original author. But the code says that your two assumptions are yes.
In this case I propose we have a variant of getNameInfo that expresses
these assumptions in types. E.g.
getNameInfo ::
(Option f, Option g) =>
[NameInfoFlag] -> SockAddr -> IO (f HostName, g ServiceName)
class Option f where
instance Option Identity where
instance Option Ignore where
data Ignore a = Ignore -- isomorphic to Proxy
I do not understand the warranties,
getNameInfo
makes about its results.If an argument is
False
, does this mean that the corresponding result is alwaysNothing
?Likewise, if an argument is
True
, does this mean that the corresponding result is alwaysJust
?Related to #416.
The text was updated successfully, but these errors were encountered: