summaryrefslogtreecommitdiffhomepage
path: root/Role/Developer.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-27 10:29:33 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-27 10:29:33 -0400
commit952cc2941091518e61345f005b6e218bc34f75ec (patch)
treec5130b0dc4733f96b0855321919fe508b6d15fdc /Role/Developer.hs
parent937b55549b4ba72b0392d7e139e592a40eec2101 (diff)
downloaddebug-me-952cc2941091518e61345f005b6e218bc34f75ec.tar.gz
don't need Maybe ElapsedTime
Make it a monoid and use mempty = 0
Diffstat (limited to 'Role/Developer.hs')
-rw-r--r--Role/Developer.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Role/Developer.hs b/Role/Developer.hs
index a0e178e..b0d66a5 100644
--- a/Role/Developer.hs
+++ b/Role/Developer.hs
@@ -88,7 +88,7 @@ sendTtyInput ichan devstate logger = go
let act = mkSigned (developerSessionKey ds) $
Activity entered
(Just $ lastActivity ds)
- (Just $ mkElapsedTime (lastActivityTs ds) ts)
+ (mkElapsedTime (lastActivityTs ds) ts)
writeTMChan ichan (ActivityMessage act)
let acth = hash act
let ds' = ds
@@ -241,7 +241,6 @@ getServerMessage ochan devstate ts = do
-- Does not check the signature.
isLegalSeen :: Activity Seen -> DeveloperState -> POSIXTime -> (Bool, DeveloperState)
isLegalSeen (Activity _ Nothing _ _) ds _ = (False, ds)
-isLegalSeen (Activity _ _ Nothing _) ds _ = (False, ds)
isLegalSeen act@(Activity (Seen (Val b)) (Just hp) _ _) ds ts
-- Does it chain to the last Seen activity or to
-- something sent by another developer since the last Seen?
@@ -307,7 +306,7 @@ processSessionStart ochan logger = do
<$> atomically (readTMChan ochan)
logger startmsg
let (starthash, output) = case startmsg of
- User (ActivityMessage act@(Activity (Seen (Val b)) Nothing Nothing _))
+ User (ActivityMessage act@(Activity (Seen (Val b)) Nothing _ _))
| verifySigned sigverifier act ->
(hash act, TtyOutput b)
_ -> error $ "Unexpected startup message: " ++ show startmsg