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
Test suite will be inherited from Dominic Sayer's isemail, and won't be inlined in the code.
The basic EmailAddress should not provide individual access to localPart/domainPart, but instead be a newtype around Text. This will facilitate loading/storing from unvalidated stores in a simpler fashion than is currently possible (e.g. at the moment you can use unsafeEmailAddress but it takes the two parts separately, not a single email address string).
Lift ParseOptions to type level, per this comment.
The default parsing mode will change to something saner that excludes "obsolete" syntaxes (these can be accessed using the "Detailed" module).
Support internationalized emails.
In local parts
Add tests for each bit (atext, ctext, etc – ignore dtext since we'll do proper handling)
In domains (this probably requires an IDNA2008 implementation)
For those who want full analysis, there will be a separate "Detailed" module which can break apart an email address. (Or, just provide functions to break down the EmailAddress type...)
This module will provide DomainPart = HostName | IP.
TODO: what modules to depend on for IP address types? There are currently ip, network-ip, others? Do any of them expose parsers from Text?
Resolution: I chose ip for now, since it provides Attoparsec Text parsers.
To pass tests I need to close these issues:
Ideas for v3:
isemail, and won't be inlined in the code.EmailAddressshould not provide individual access tolocalPart/domainPart, but instead be anewtypearoundText. This will facilitate loading/storing from unvalidated stores in a simpler fashion than is currently possible (e.g. at the moment you can useunsafeEmailAddressbut it takes the two parts separately, not a single email address string).ParseOptionsto type level, per this comment.EmailAddresstype...)DomainPart = HostName | IP.TODO: what modules to depend on for IP address types? There are currently ip, network-ip, others? Do any of them expose parsers from
Text?Resolution: I chose
ipfor now, since it provides AttoparsecTextparsers.To pass tests I need to close these issues:
this should fall out of better domain parsing
emailaddress)