From 0222ca35ec03836ab216aff1a38e337e2be16511 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 14 Apr 2017 17:00:59 -0400 Subject: log JSON to debug-me.log (for now) useful for debugging, etc This commit was sponsored by Alexander Thompson on Patreon. --- Types.hs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Types.hs') 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) -- cgit v1.2.3