summaryrefslogtreecommitdiffhomepage
path: root/Types.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-21 17:42:10 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-21 17:52:18 -0400
commit5572dbc8289de934e9ee5bc3f74a0f98365ce3e5 (patch)
tree9c1bba1a5d40748f72e13be788c29ed24dc3dd28 /Types.hs
parent360d8ac4601dc5b48c22eeb93eb1853cee99e6c9 (diff)
downloaddebug-me-5572dbc8289de934e9ee5bc3f74a0f98365ce3e5.tar.gz
initial http server
Incomplete, but the client is able to connect and send messages which get logged. Split up debug-me.hs into Role/* Switched from cereal to binary, since websockets operate on lazy ByteStrings, and using cereal would involve a copy on every receive. This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
Diffstat (limited to 'Types.hs')
-rw-r--r--Types.hs28
1 files changed, 14 insertions, 14 deletions
diff --git a/Types.hs b/Types.hs
index 699fa59..b28713d 100644
--- a/Types.hs
+++ b/Types.hs
@@ -2,7 +2,7 @@
{- | Main types for debug-me
-
- - Note that changing types in ways that change the cereal serialization
+ - 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.
-}
@@ -136,56 +136,56 @@ newtype GpgSig = GpgSig Val
instance DataSize GpgSig where
dataSize (GpgSig s) = dataSize s
-instance Serialize Seen
+instance Binary Seen
instance ToJSON Seen
instance FromJSON Seen
-instance Serialize Entered
+instance Binary Entered
instance ToJSON Entered
instance FromJSON Entered
-instance Serialize (Activity Seen)
+instance Binary (Activity Seen)
instance ToJSON (Activity Seen)
instance FromJSON (Activity Seen)
-instance Serialize (Activity Entered)
+instance Binary (Activity Entered)
instance ToJSON (Activity Entered)
instance FromJSON (Activity Entered)
-instance Serialize Control
+instance Binary Control
instance ToJSON Control
instance FromJSON Control
-instance Serialize Hash
+instance Binary Hash
instance ToJSON Hash
instance FromJSON Hash
-instance Serialize HashMethod
+instance Binary HashMethod
instance ToJSON HashMethod
instance FromJSON HashMethod
-instance Serialize PublicKey
+instance Binary PublicKey
instance ToJSON PublicKey
instance FromJSON PublicKey
-instance Serialize GpgSig
+instance Binary GpgSig
instance ToJSON GpgSig
instance FromJSON GpgSig
-instance Serialize (Message Seen)
+instance Binary (Message Seen)
instance ToJSON (Message Seen) where
toJSON = genericToJSON sumOptions
toEncoding = genericToEncoding sumOptions
instance FromJSON (Message Seen) where
parseJSON = genericParseJSON sumOptions
-instance Serialize (Message Entered)
+instance Binary (Message Entered)
instance ToJSON (Message Entered) where
toJSON = genericToJSON sumOptions
toEncoding = genericToEncoding sumOptions
instance FromJSON (Message Entered) where
parseJSON = genericParseJSON sumOptions
-instance Serialize Signature
+instance Binary Signature
instance ToJSON Signature where
toJSON = genericToJSON sumOptions
toEncoding = genericToEncoding sumOptions
instance FromJSON Signature where
parseJSON = genericParseJSON sumOptions
-instance Serialize ControlAction
+instance Binary ControlAction
instance ToJSON ControlAction where
toJSON = genericToJSON sumOptions
toEncoding = genericToEncoding sumOptions