Unified port, w/o port function naming
Closed this issue · 2 comments
dubiousdavid commented
I'm wondering if the following convention would be helpful for differentiating with and without a port function variations. I'm assuming most users will not need to specify a port, so I made those names easier to write/remember.
--This one uses the default port (25)
connectSMTP :: Hostname -> IO SMTPConnection
connectSMTP' :: Hostname -> PortNumber -> IO SMTPConnection
--This one uses the default port (25)
sendMail :: Hostname -> Mail -> IO ()
sendMail' :: Hostname -> PortNumber -> Mail -> IO ()
--This one uses the default port (25)
sendMailWithLogin :: Hostname -> UserName -> Password -> Mail -> IO ()
sendMailWithLogin' :: Hostname -> PortNumber -> UserName -> Password -> Mail -> IO ()
Notice also the Hostname type alias for increased clarity. Let me know what you think.
David
jhickner commented
Sure, I think this looks fine. Do you want to put together a pull request?
dubiousdavid commented
Sure thing.
On Dec 17, 2012, at 3:40 PM, Jason Hickner notifications@github.com wrote:
Sure, I think this looks fine. Do you want to put together a pull request?
—
Reply to this email directly or view it on GitHub.