diff options
Diffstat (limited to 'Types.hs')
-rw-r--r-- | Types.hs | 24 |
1 files changed, 4 insertions, 20 deletions
@@ -2,9 +2,9 @@ {- | Main types for debug-me - - - Note that changing types in ways that change the Binary serialization - - changes debug-me's wire format. Changing types in ways that change the - - aeson serialization changes debug-me's log format. + - Note that changing types in ways that change the JSON serialization + - changes debug-me's log format, and in some cases also changes the wire + - format. -} module Types ( @@ -14,7 +14,7 @@ module Types ( import Val import Memory -import Serialization +import JSON import Data.Time.Clock.POSIX @@ -169,7 +169,6 @@ data AnyMessage | Developer (Message Entered) deriving (Show, Generic) -instance Binary ElapsedTime instance ToJSON ElapsedTime instance FromJSON ElapsedTime @@ -177,70 +176,55 @@ instance DataSize AnyMessage where dataSize (User a) = dataSize a dataSize (Developer a) = dataSize a -instance Binary AnyMessage instance ToJSON AnyMessage where toJSON = genericToJSON sumOptions toEncoding = genericToEncoding sumOptions instance FromJSON AnyMessage where parseJSON = genericParseJSON sumOptions -instance Binary Seen instance ToJSON Seen instance FromJSON Seen -instance Binary Entered instance ToJSON Entered instance FromJSON Entered -instance Binary (Activity Seen) instance ToJSON (Activity Seen) instance FromJSON (Activity Seen) -instance Binary (Activity Entered) instance ToJSON (Activity Entered) instance FromJSON (Activity Entered) -instance Binary Control instance ToJSON Control instance FromJSON Control -instance Binary Hash instance ToJSON Hash instance FromJSON Hash -instance Binary HashMethod instance ToJSON HashMethod instance FromJSON HashMethod -instance Binary PublicKey instance ToJSON PublicKey instance FromJSON PublicKey -instance Binary GpgSig instance ToJSON GpgSig instance FromJSON GpgSig -instance Binary (Message Seen) instance ToJSON (Message Seen) where toJSON = genericToJSON sumOptions toEncoding = genericToEncoding sumOptions instance FromJSON (Message Seen) where parseJSON = genericParseJSON sumOptions -instance Binary (Message Entered) instance ToJSON (Message Entered) where toJSON = genericToJSON sumOptions toEncoding = genericToEncoding sumOptions instance FromJSON (Message Entered) where parseJSON = genericParseJSON sumOptions -instance Binary Signature instance ToJSON Signature where toJSON = genericToJSON sumOptions toEncoding = genericToEncoding sumOptions instance FromJSON Signature where parseJSON = genericParseJSON sumOptions -instance Binary ControlAction instance ToJSON ControlAction where toJSON = genericToJSON sumOptions toEncoding = genericToEncoding sumOptions instance FromJSON ControlAction where parseJSON = genericParseJSON sumOptions -instance Binary (PerhapsSigned PublicKey) instance ToJSON (PerhapsSigned PublicKey) where toJSON = genericToJSON sumOptions toEncoding = genericToEncoding sumOptions |