diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-04-12 15:29:19 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-04-12 15:34:05 -0400 |
commit | 2288820b8a17cf3329b8655c4df1cff63ac735cf (patch) | |
tree | 2d1be0b4d90e3a3cdb56337fec8c5a16d87c9958 /Types.hs | |
parent | 22d0afca50ac4e43f21e34b93076b592a99eddcf (diff) | |
download | debug-me-2288820b8a17cf3329b8655c4df1cff63ac735cf.tar.gz |
use Activity types for user<->developer communication
Still all in a single process with no serialization, but now there are
separate threads for the user and developer sides, and they communicate
Activity back and forth.
Signatures are not checked yet, but both user and developer check that
the other side is sending Activity that forms a valid hash chain with
previous Activity.
The echo simulation is included, but may be buggy. This seems to work
well enough with 0 latency at least.
This commit was sponsored by Thom May on Patreon.
Diffstat (limited to 'Types.hs')
-rw-r--r-- | Types.hs | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -27,9 +27,13 @@ data Activity a | StartActivity a Signature deriving (Show) +activityContent :: Activity a -> a +activityContent (Activity a _ _) = a +activityContent (StartActivity a _) = a + data Signature = Signature ByteString deriving (Show) -- | A SHA2 hash pointer to something that hashes to this value. newtype HashPointer = HashPointer (H.Digest H.SHA256) - deriving (Show) + deriving (Show, Eq) |