@@ -220,7 +220,7 @@ digits = some digit
220220||| Recognise a single hexidecimal digit
221221export
222222hexDigit : Lexer
223−hexDigit = digit <|> oneOf "abcdefABCDEF"
223+hexDigit = pred isHexDigit
224224
225225||| Recognise one or more hexidecimal digits
226226export
@@ -325,7 +325,7 @@ intLit = opt (is '-') <+> digits
325325||| Recognise a hexidecimal literal, prefixed by "0x" or "0X"
326326export
327327hexLit : Lexer
328−hexLit = is '0' <+> oneOf "xX" <+> hexDigits
328+hexLit = approx "0x" <+> hexDigits
329329
330330||| A mapping from lexers to the tokens they produce.
331331||| This is a list of pairs `(Lexer, String -> tokenType)`