equal
deleted
inserted
replaced
44 where |
44 where |
45 decoded = fromEngineMsg msg |
45 decoded = fromEngineMsg msg |
46 check Nothing = (False, False) |
46 check Nothing = (False, False) |
47 check (Just (m:ms)) = (m `Set.member` legalMessages, m == '+') |
47 check (Just (m:ms)) = (m `Set.member` legalMessages, m == '+') |
48 check _ = (False, False) |
48 check _ = (False, False) |
49 legalMessages = Set.fromList $ "M#+LlRrUuDdZzAaSjJ,sFNpPwtghb12345" ++ slotMessages |
49 legalMessages = Set.fromList $ "M#+LlRrUuDdZzAaSjJ,sFNpPwtghbc12345" ++ slotMessages |
50 slotMessages = "\128\129\130\131\132\133\134\135\136\137\138" |
50 slotMessages = "\128\129\130\131\132\133\134\135\136\137\138" |
51 |
51 |
52 maybeRead :: Read a => String -> Maybe a |
52 maybeRead :: Read a => String -> Maybe a |
53 maybeRead s = case reads s of |
53 maybeRead s = case reads s of |
54 [(x, rest)] | all isSpace rest -> Just x |
54 [(x, rest)] | all isSpace rest -> Just x |