diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-04-30 14:58:32 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-04-30 14:58:32 -0400 |
commit | b0f8a010254b97548b5a7140cc7137c53e30f8cd (patch) | |
tree | 705319640348385f286bb40d0b0160d35a64c09a /Types.hs | |
parent | cf8d59b2fbcc52378f5ae840e2153f444a3283bf (diff) | |
download | debug-me-b0f8a010254b97548b5a7140cc7137c53e30f8cd.tar.gz |
server: email logs to user, and option to delete old ones
Diffstat (limited to 'Types.hs')
-rw-r--r-- | Types.hs | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 |