Skip to content

Commit

Permalink
more tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej committed Feb 25, 2020
1 parent c10eb9e commit afc0ba6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cabal/Distribution/FieldGrammar/Described.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class (Pretty a, Parsec a) => Described a where
-- | Pretty-print description.
--
-- >>> describeDoc ([] :: [Bool])
-- \mathop{\mathord{"}\mathtt{True}\mathord{"}}\mid\mathop{\mathord{"}\mathtt{False}\mathord{"}}
-- \left\{ \mathop{\mathord{``}\mathtt{True}\mathord{"}}\mid\mathop{\mathord{``}\mathtt{False}\mathord{"}} \right\}
--
describeDoc :: Described a => proxy a -> PP.Doc
describeDoc p = regexDoc (describe p)
Expand Down
3 changes: 3 additions & 0 deletions Cabal/Distribution/Types/Dependency.hs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ versionGuardMultilibs expr = do
-- >>> simpleParsec "mylib:{ sub1 , sub2 } ^>= 42" :: Maybe Dependency
-- Just (Dependency (PackageName "mylib") (MajorBoundVersion (mkVersion [42])) (fromList [LSubLibName (UnqualComponentName "sub1"),LSubLibName (UnqualComponentName "sub2")]))
--
-- >>> simpleParsec "mylib:{ } ^>= 42" :: Maybe Dependency
-- Just (Dependency (PackageName "mylib") (MajorBoundVersion (mkVersion [42])) (fromList []))
--
-- Spaces around colon are not allowed:
--
-- >>> simpleParsec "mylib: sub" :: Maybe Dependency
Expand Down
4 changes: 2 additions & 2 deletions Cabal/Distribution/Utils/Regex.hs
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ reVar1 = REVar (Just Nothing)
-- |
--
-- >>> regexDoc $ REString "True"
-- \mathop{\mathord{"}\mathtt{True}\mathord{"}}
-- \mathop{\mathord{``}\mathtt{True}\mathord{"}}
--
-- Note: we don't simplify regexps yet:
--
-- >>> regexDoc $ REString "foo" <> REString "bar"
-- \mathop{\mathord{"}\mathtt{foo}\mathord{"}}\mathop{\mathord{"}\mathtt{bar}\mathord{"}}
-- \mathop{\mathord{``}\mathtt{foo}\mathord{"}}\mathop{\mathord{``}\mathtt{bar}\mathord{"}}
--
regexDoc :: Regex Void -> PP.Doc
regexDoc = go 0 . vacuous where
Expand Down
4 changes: 2 additions & 2 deletions Cabal/doc/buildinfo-fields-reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ Optional comma separated
\mathrm{optcommalist}(\mathit{element}) =
\left\{ \begin{gathered}{\mathop{\mathit{element}}}^\ast_{\bullet}\\{\mathop{\mathit{element}}}^\ast_{\left(\circ\mathop{\mathord{``}\mathtt{\text{,}}\mathord{"}}\circ\right)}\\\mathop{\mathord{``}\mathtt{\text{,}}\mathord{"}}\circ{\mathop{\mathit{element}}}^+_{\left(\circ\mathop{\mathord{``}\mathtt{\text{,}}\mathord{"}}\circ\right)}\\{\mathop{\mathit{element}}}^+_{\left(\circ\mathop{\mathord{``}\mathtt{\text{,}}\mathord{"}}\circ\right)}\circ\mathop{\mathord{``}\mathtt{\text{,}}\mathord{"}}\end{gathered} \right\}
Terminals
Non-terminals
-------------

In the syntax definitions below the following terminal symbols are used:
In the syntax definitions below the following non-terminal symbols are used:

hs-string
String as in Haskell; it's recommended to avoid using Haskell-specific escapes.
Expand Down
4 changes: 2 additions & 2 deletions buildinfo-reference-generator/template.zinza
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ Optional comma separated
\mathrm{optcommalist}(\mathit{element}) =
{{optCommaList}}

Terminals
Non-terminals
-------------

In the syntax definitions below the following terminal symbols are used:
In the syntax definitions below the following non-terminal symbols are used:

{% for production in productions %}
{{ production.name }}
Expand Down

0 comments on commit afc0ba6

Please sign in to comment.