Open
Description
Ideas for v3:
- Input type should be Text, not ByteString (see Use Text instead of ByteString, since emails can be unicode #9)
- 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 tolocalPart
/domainPart
, but instead be anewtype
aroundText
. This will facilitate loading/storing from unvalidated stores in a simpler fashion than is currently possible (e.g. at the moment you can useunsafeEmailAddress
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)
- In local parts
- 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 fromText
?
Resolution: I choseip
for now, since it provides AttoparsecText
parsers.
To pass tests I need to close these issues:
- This module will provide
- Error messages should be improved, and this checked by tests.
- Consider exposing an FFI interface for other languages to use.
- Consider improved equality (see Use case-insensitive ByteString in EmailAddress #36)
this should fall out of better domain parsing - Consider switching to Megaparsec, for better error messages?
- Consider which instances to upstream from https://github.com/cdepillabout/emailaddress (as pointed out by @bitemyapp)
- NFData (per Add NFData and Binary instances to EmailAddress #25)
- Binary (per Add NFData and Binary instances to EmailAddress #25)
- PathPiece (per Consider adding PathPiece instance? #20)
- Aeson instances (from
emailaddress
)
Metadata
Metadata
Assignees
Labels
No labels