Commit 66e22322 authored by Oleg Grenrus's avatar Oleg Grenrus
Browse files

Fix typos and add comments

parent c72fd0e7
......@@ -55,7 +55,7 @@ infixl 5 ^^^
(^^^) :: a -> (a -> b) -> b
x ^^^ f = f x
-- | Partitionin state
-- | Partitioning state
data PS ann = PS (Fields ann) [Section ann] [[Section ann]]
-- | Partition field list into field map and groups of sections.
......
......@@ -6,7 +6,7 @@
-- Fields can be specified multiple times in the .cabal files. The order of
-- such entries is important, but the mutual ordering of different fields is
-- not.Also conditional sections are considered after non-conditional data.
-- The example of this silent-commutation quirck is the fact that
-- The example of this silent-commutation quirk is the fact that
--
-- @
-- buildable: True
......
......@@ -64,7 +64,9 @@ showFilePath = showToken
showToken :: String -> PP.Doc
showToken str
-- if token looks like a comment (starts with --), print it in quotes
| "--" `isPrefixOf` str = PP.text (show str)
-- also if token ends with a colon (e.g. executable name), print it in quotes
| ":" `isSuffixOf` str = PP.text (show str)
| not (any dodgy str) && not (null str) = PP.text str
| otherwise = PP.text (show str)
......
......@@ -191,7 +191,8 @@ roundtripTest _ fpath bsl = do
let bs' = showGenericPackageDescription x0
y0 <- parse "2nd" (toUTF8BS bs')
-- unspecified license
-- 'License' type doesn't support parse . pretty roundrip (yet).
-- Will be fixed when we refactor to SPDX
let y1 = if x0 ^. L.packageDescription . L.license == UnspecifiedLicense
&& y0 ^. L.packageDescription . L.license == UnknownLicense "UnspecifiedLicense"
then y0 & L.packageDescription . L.license .~ UnspecifiedLicense
......
......@@ -110,6 +110,8 @@ formatRoundTripTest fp = testCase "roundtrip" $ do
x <- parse contents
let contents' = showGenericPackageDescription x
y <- parse (toUTF8BS contents')
-- 'License' type doesn't support parse . pretty roundrip (yet).
-- Will be fixed when we refactor to SPDX
let y' = if x ^. L.packageDescription . L.license == UnspecifiedLicense
&& y ^. L.packageDescription . L.license == UnknownLicense "UnspecifiedLicense"
then y & L.packageDescription . L.license .~ UnspecifiedLicense
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment