summaryrefslogtreecommitdiffhomepage
path: root/Types.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-14 17:00:59 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-14 17:05:03 -0400
commit0222ca35ec03836ab216aff1a38e337e2be16511 (patch)
treec87a16ce0fac2dbaf354719fa5ae0dccc283343e /Types.hs
parentb5d5f86a88c8dbd1cee9e28a659bfe1c26f38eaa (diff)
downloaddebug-me-0222ca35ec03836ab216aff1a38e337e2be16511.tar.gz
log JSON to debug-me.log (for now)
useful for debugging, etc This commit was sponsored by Alexander Thompson on Patreon.
Diffstat (limited to 'Types.hs')
-rw-r--r--Types.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/Types.hs b/Types.hs
index d1cb513..a439c7c 100644
--- a/Types.hs
+++ b/Types.hs
@@ -47,6 +47,20 @@ instance FromJSON (Activity Seen)
instance ToJSON (Activity Entered)
instance FromJSON (Activity Entered)
+-- | A log of Activity both Entered and Seen.
+data ActivityLog
+ = ActivitySeen
+ { activitySeen :: Activity Seen
+ }
+ | ActivityEntered
+ { activityEntered :: Activity Entered
+ , activityEnteredAccepted :: Bool
+ }
+ deriving (Show, Generic)
+
+instance ToJSON (ActivityLog)
+instance FromJSON (ActivityLog)
+
newtype Signature = Signature Val
deriving (Show, Generic)