From ccdb5a3c6a28cc6745d337bdb67e62d70216ef7e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 18 Apr 2017 13:54:16 -0400 Subject: refactor out Log --- Types.hs | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'Types.hs') diff --git a/Types.hs b/Types.hs index ae37989..c3b5340 100644 --- a/Types.hs +++ b/Types.hs @@ -16,7 +16,6 @@ import Val import GHC.Generics (Generic) import Data.Aeson import qualified Data.Aeson.Types as Aeson -import Data.Time.Clock.POSIX -- | Things that the developer sees. data Seen = Seen @@ -52,25 +51,6 @@ data Activity a = Activity } deriving (Show, Generic) -data SomeActivity - = ActivitySeen (Activity Seen) - | ActivityEntered (Activity Entered) - deriving (Show, Generic) - --- | A log of Activity both Entered and Seen, which can be recorded to --- prove what happened in a debug-me session. --- --- Note that the time stamp is included to allow replaying logs, but --- it's not part of the provable session. -data ActivityLog = ActivityLog - { loggedActivity :: SomeActivity - , loggedHash :: Hash - , loggedTimestamp :: Timestamp - } - deriving (Show, Generic) - -type Timestamp = POSIXTime - newtype Signature = Signature Val deriving (Show, Generic) @@ -93,8 +73,6 @@ instance ToJSON (Activity Seen) instance FromJSON (Activity Seen) instance ToJSON (Activity Entered) instance FromJSON (Activity Entered) -instance ToJSON (ActivityLog) -instance FromJSON (ActivityLog) instance ToJSON Signature instance FromJSON Signature instance ToJSON Hash @@ -117,9 +95,3 @@ instance ToJSON (Proto Entered) where toEncoding = genericToEncoding sumOptions instance FromJSON (Proto Entered) where parseJSON = genericParseJSON sumOptions - -instance ToJSON SomeActivity where - toJSON = genericToJSON sumOptions - toEncoding = genericToEncoding sumOptions -instance FromJSON SomeActivity where - parseJSON = genericParseJSON sumOptions -- cgit v1.2.3