We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 556eb16 commit 91ba348Copy full SHA for 91ba348
1 file changed
evdev/src/Evdev/Codes/Generator.hs
@@ -46,12 +46,12 @@ skippedNames = ["KEY_MIN_INTERESTING"]
46
-- | Parse a single @#define@ line.
47
parseLine :: String -> Maybe Define
48
parseLine line = case words line of
49
- ("#define" : name : value : _)
+ ("#define" : name : value@(v : _) : _)
50
| any (`isSuffixOf'` name) ["_MAX", "_CNT"] -> Nothing
51
| name `elem` skippedNames -> Nothing
52
| name == "_INPUT_EVENT_CODES_H" -> Nothing
53
- | isDigit (head value) -> Just (Primary name value)
54
- | isAlpha (head value) -> Just (Alias name value)
+ | isDigit v -> Just (Primary name value)
+ | isAlpha v -> Just (Alias name value)
55
| otherwise -> Nothing
56
_ -> Nothing
57
where
0 commit comments