I think it would be appropriate to use the case-insensitive package to represent the internal ByteStrings domain in EmailAddress. This would also seem to "fix" the Eq instance.
Has this been considered before? I've generally implemented the entire email address in a web app as newtype Email = Email CaseInsensitive.ByteString but after a little research, it appears the part before the @ can technically be interpreted as case-sensitive.
I think it would be appropriate to use the
case-insensitivepackage to represent the internalByteStrings domain inEmailAddress. This would also seem to "fix" theEqinstance.Has this been considered before? I've generally implemented the entire email address in a web app as
newtype Email = Email CaseInsensitive.ByteStringbut after a little research, it appears the part before the@can technically be interpreted as case-sensitive.