@@ -1,6 +1,5 @@
1{-# OPTIONS_GHC -Wno-orphans #-}
1{-# OPTIONS_GHC -Wno-orphans #-}
2{-# LANGUAGE CPP #-}
2{-# LANGUAGE CPP #-}
4module Text.Email.Extra
3module Text.Email.Extra
5 ( validateEmail
4 ( validateEmail
6 , emailToText
5 , emailToText
@@ -25,10 +24,6 @@ import Database.PostgreSQL.Simple.ToField as PG
25import Control.Monad
24import Control.Monad
26import Data.Aeson
25import Data.Aeson
33-- | Validate that the domain part in this email address is
28-- | Validate that the domain part in this email address is
34-- in fact a domain name.
29-- in fact a domain name.
@@ -110,11 +105,3 @@ instance ToJSON EmailAddress where
110instance FromJSON EmailAddress where
105instance FromJSON EmailAddress where
111 parseJSON = parseJSON >=> either fail pure . validateEmail . Text.encodeUtf8
106 parseJSON = parseJSON >=> either fail pure . validateEmail . Text.encodeUtf8
115−instance ToSchema EmailAddress where
116− declareNamedSchema _ = declareNamedSchema (Proxy :: Proxy Text)
118−instance ToParamSchema EmailAddress where
119− toParamSchema _ = toParamSchema (Proxy :: Proxy Text)