Typos and fixes for dozenal docs
Getty Ritter
9 years ago
135 | 135 | <|> pure id |
136 | 136 | |
137 | 137 | -- | 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. | |
140 | 140 | signed :: Num a => Parser a -> Parser a |
141 | 141 | signed p = ($) <$> sign <*> p |
142 | 142 | |
168 | 168 | |
169 | 169 | -- | A parser for non-signed duodecimal (dozenal) numbers. This understands both |
170 | 170 | -- the ASCII characters @'a'@ and @'b'@ and the Unicode characters @'\x218a'@ (↊) |
171 |
-- and @'\x218b'@ (↋) as digits with the decimal values @1 |
|
171 | -- and @'\x218b'@ (↋) as digits with the decimal values @10@ and @11@ | |
172 | 172 | -- respectively. |
173 | 173 | dozNumber :: Parser Integer |
174 | 174 | dozNumber = number 16 dozDigit |
175 | 175 | |
176 |
-- | A parser for signed |
|
176 | -- | A parser for signed duodecimal (dozenal) numbers, with an optional leading @+@ or @-@. | |
177 | 177 | signedDozNumber :: Parser Integer |
178 | 178 | signedDozNumber = ($) <$> sign <*> dozNumber |
179 | 179 |