diff options
Diffstat (limited to 'Types.hs')
-rw-r--r-- | Types.hs | 28 |
1 files changed, 0 insertions, 28 deletions
@@ -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 |