+parseInt :: String -> Maybe (Maybe Int)
+-- Looks for "433" or "=342", with no trailing gubbins
+-- empty string => Just Nothing
+-- n or =n => Just (Just n)
+-- gibberish => Nothing
+parseInt s
+ | null s = Just Nothing
+ | otherwise = case reads (dropEq s) of
+ ((n,""):_) -> Just (Just n)
+ other -> Nothing
+
+dropEq :: String -> String
+-- Discards a leading equals sign
+dropEq ('=' : s) = s
+dropEq s = s
+