浏览代码

Typos and fixes for dozenal docs

Getty Ritter 8 年之前
父节点
当前提交
5559e7eb9e
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      Data/SCargot/Common.hs

+ 4 - 0
Data/SCargot/Common.hs

@@ -135,8 +135,8 @@ sign =  (pure id     <* char '+')
     <|> pure id
 
 -- | Given a parser for some kind of numeric literal, this will attempt to
+--   parse a leading @+@ or a leading @-@ followed by the numeric literal,
+--   and if a @-@ is found, negate that literal.
 signed :: Num a => Parser a -> Parser a
 signed p = ($) <$> sign <*> p
 
@@ -168,12 +168,12 @@ dozDigit = digit <|> oneOf "AaBb\x218a\x218b"
 
 -- | A parser for non-signed duodecimal (dozenal) numbers. This understands both
 --   the ASCII characters @'a'@ and @'b'@ and the Unicode characters @'\x218a'@ (↊)
+--   and @'\x218b'@ (↋) as digits with the decimal values @10@ and @11@
 --   respectively.
 dozNumber :: Parser Integer
 dozNumber = number 16 dozDigit
 
+-- | A parser for signed duodecimal (dozenal) numbers, with an optional leading @+@ or @-@.
 signedDozNumber :: Parser Integer
 signedDozNumber = ($) <$> sign <*> dozNumber