Skip to content

Commit

Permalink
Fix some Haddock quoting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalBrains1 committed Feb 25, 2024
1 parent de4216f commit 26cebf4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions System/Console/Docopt/ParseUtils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ manyTill1 p end = do
rest <- manyTill p end
return $ first : rest

-- |@skipUntil p@ ignores everything that comes before `p`.
-- Returns what `p` returns.
-- |@skipUntil p@ ignores everything that comes before @p@.
-- Returns what @p@ returns.
skipUntil :: Show a => CharParser u a -> CharParser u ()
skipUntil p = skipMany (notFollowedBy p >> anyChar)

Expand Down
2 changes: 1 addition & 1 deletion System/Console/Docopt/Public.hs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ notPresent = (not .) . isPresent
-- > Usage:
-- > prog <required>
--
-- then @getArg args (argument \'required\')@ is guaranteed to be a 'Just'.
-- then @getArg args (argument "required")@ is guaranteed to be a 'Just'.
getArg :: Arguments -> Option -> Maybe String
getArg args opt =
case opt `M.lookup` args of
Expand Down
9 changes: 6 additions & 3 deletions System/Console/Docopt/UsageParse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ pUsagePatterns = do
-- * Option Synonyms & Defaults Parsers

-- | Succeeds only on the first line of an option explanation
-- (one whose first non-space character is '-')
-- (one whose first non-space character is @\'-\'@)
begOptionLine :: CharParser OptInfoMap String
begOptionLine = inlineSpaces >> lookAhead (char '-') >> return "-"

Expand Down Expand Up @@ -256,8 +256,11 @@ canRepeat pat target =
-- | Compare on specificity of parsers built from optA and optB,
-- so we can be sure the parser tries the most-specific first, where possible.
-- E.g.
-- LongOption "option" > ShortOption 'o' == True
-- Command "cmd" > Argument "arg" == True
--
-- @
-- LongOption "option" > ShortOption \'o\' == True
-- Command "cmd" > Argument "arg" == True
-- @
compareOptSpecificity :: Option -> Option -> Ordering
compareOptSpecificity optA optB = case optA of
LongOption a -> case optB of
Expand Down

0 comments on commit 26cebf4

Please sign in to comment.