summaryrefslogtreecommitdiffhomepage
path: root/Types.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-30 14:58:32 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-30 14:58:32 -0400
commitb0f8a010254b97548b5a7140cc7137c53e30f8cd (patch)
tree705319640348385f286bb40d0b0160d35a64c09a /Types.hs
parentcf8d59b2fbcc52378f5ae840e2153f444a3283bf (diff)
downloaddebug-me-b0f8a010254b97548b5a7140cc7137c53e30f8cd.tar.gz
server: email logs to user, and option to delete old ones
Diffstat (limited to 'Types.hs')
-rw-r--r--Types.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/Types.hs b/Types.hs
index 7622f6a..c0eb7dd 100644
--- a/Types.hs
+++ b/Types.hs
@@ -15,6 +15,7 @@ import Val
import Memory
import JSON
+import qualified Data.Text as T
import Data.Time.Clock.POSIX
-- | Things that the developer sees.
@@ -123,6 +124,8 @@ instance DataSize Hash where
data HashMethod = SHA512 | SHA3
deriving (Show, Generic, Eq)
+type EmailAddress = T.Text
+
data Signature
= Ed25519Signature Val
| OtherSignature Val
@@ -172,14 +175,14 @@ instance Monoid ElapsedTime where
instance DataSize ElapsedTime where
dataSize _ = 16 -- 128 bit Double
+instance ToJSON ElapsedTime
+instance FromJSON ElapsedTime
+
data AnyMessage
= User (Message Seen)
| Developer (Message Entered)
deriving (Show, Generic)
-instance ToJSON ElapsedTime
-instance FromJSON ElapsedTime
-
instance DataSize AnyMessage where
dataSize (User a) = dataSize a
dataSize (Developer a) = dataSize a