gdritter repos s-cargot / 5559e7e
Typos and fixes for dozenal docs Getty Ritter 8 years ago
1 changed file(s) with 4 addition(s) and 4 deletion(s). Collapse all Expand all
135135 <|> pure id
136136
137137 -- | Given a parser for some kind of numeric literal, this will attempt to
138 -- parse a leading @+@ or a leading @-@ and, in the latter case, negate
139 -- the parsed number.
138 -- parse a leading @+@ or a leading @-@ followed by the numeric literal,
139 -- and if a @-@ is found, negate that literal.
140140 signed :: Num a => Parser a -> Parser a
141141 signed p = ($) <$> sign <*> p
142142
168168
169169 -- | A parser for non-signed duodecimal (dozenal) numbers. This understands both
170170 -- the ASCII characters @'a'@ and @'b'@ and the Unicode characters @'\x218a'@ (↊)
171 -- and @'\x218b'@ (↋) as digits with the decimal values @11@ and @12@
171 -- and @'\x218b'@ (↋) as digits with the decimal values @10@ and @11@
172172 -- respectively.
173173 dozNumber :: Parser Integer
174174 dozNumber = number 16 dozDigit
175175
176 -- | A parser for signed hexadecimal numbers, with an optional leading @+@ or @-@.
176 -- | A parser for signed duodecimal (dozenal) numbers, with an optional leading @+@ or @-@.
177177 signedDozNumber :: Parser Integer
178178 signedDozNumber = ($) <$> sign <*> dozNumber
179179