Skip to content

Commit ddca7d6

Browse files
authored
Merge pull request #6690 from commercialhaskell/consistency
Consistency of terminology in in-app documentation
2 parents b5a43e8 + c3a465d commit ddca7d6

File tree

7 files changed

+25
-20
lines changed

7 files changed

+25
-20
lines changed

.stan.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,25 +94,25 @@
9494

9595
# Anti-pattern: Data.ByteString.Char8.pack
9696
[[ignore]]
97-
id = "OBS-STAN-0203-hTeu0Y-389:17"
97+
id = "OBS-STAN-0203-hTeu0Y-388:17"
9898
# ✦ Description: Usage of 'pack' function that doesn't handle Unicode characters
9999
# ✦ Category: #AntiPattern
100100
# ✦ File: src\Stack\Init.hs
101101
#
102-
# 388
103-
# 389 ┃ commentHelp = BC.pack . intercalate "\n" . map commentLine
104-
# 390 ┃ ^^^^^^^
102+
# 387
103+
# 388 ┃ commentHelp = BC.pack . intercalate "\n" . map commentLine
104+
# 389 ┃ ^^^^^^^
105105

106106
# Anti-pattern: Data.ByteString.Char8.pack
107107
[[ignore]]
108-
id = "OBS-STAN-0203-hTeu0Y-406:26"
108+
id = "OBS-STAN-0203-hTeu0Y-405:26"
109109
# ✦ Description: Usage of 'pack' function that doesn't handle Unicode characters
110110
# ✦ Category: #AntiPattern
111111
# ✦ File: src\Stack\Init.hs
112112
#
113-
# 405
114-
# 406 ┃ <> B.byteString (BC.pack $ concat
115-
# 407 ┃ ^^^^^^^
113+
# 404
114+
# 405 ┃ <> B.byteString (BC.pack $ concat
115+
# 406 ┃ ^^^^^^^
116116

117117
# Anti-pattern: Data.ByteString.Char8.pack
118118
[[ignore]]

src/Stack/BuildPlan.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ instance Exception BuildPlanException where
9191
, case mapMaybe goRecommend $ Map.toList unknown of
9292
[] -> []
9393
rec ->
94-
("Recommended action: modify the extra-deps field of " ++
94+
("Recommended action: modify the value of the extra-deps key of " ++
9595
toFilePath stackYaml ++
9696
" to include the following:")
9797
: (rec
@@ -125,7 +125,7 @@ instance Exception BuildPlanException where
125125
| otherwise = concat
126126
[ ["The following packages are shadowed by project packages:"]
127127
, map go (Map.toList shadowed)
128-
, ["Recommended action: modify the extra-deps field of " ++
128+
, ["Recommended action: modify the value of the extra-deps key of " ++
129129
toFilePath stackYaml ++
130130
" to include the following:"]
131131
, extraDeps

src/Stack/ComponentFile.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,10 @@ logPossibilities dirs mn = do
432432
, line <> bulletedList (map pretty possibilities)
433433
, flow "If you are using a custom preprocessor for this module"
434434
, flow "with its own file extension, consider adding the extension"
435-
, flow "to the 'custom-preprocessor-extensions' field in stack.yaml."
435+
, flow "to the value of the"
436+
, style Shell "custom-preprocessor-extensions"
437+
, flow "key in Stack's project-level configuration file"
438+
, "(" <> style File "stack.yaml" <> ")."
436439
]
437440
where
438441
makePossibilities name =

src/Stack/Config.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ withBuildConfig inner = do
824824
, pretty dest <> "."
825825
, flow "Note: You can change the snapshot via the"
826826
, style Shell "snapshot"
827-
, flow "field there."
827+
, flow "key there."
828828
]
829829
p <- getEmptyProject mSnapshot []
830830
liftIO $ do

src/Stack/Ghci.hs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,13 +1171,16 @@ targetWarnings localTargets nonLocalTargets mfileTargets = do
11711171
, pretty projectConfigFile <> ","
11721172
, flow "then you can use"
11731173
, style Shell "stack init"
1174-
, flow "to create a new stack.yaml for the packages in the \
1175-
\current directory."
1174+
, flow "to create a new"
1175+
, style File "stack.yaml"
1176+
, flow "for the packages in the current directory."
11761177
, line
11771178
]
11781179
, flow "If you want to use the project configuration at"
11791180
, pretty projectConfigFile <> ","
1180-
, flow "then you can add to its 'packages' field."
1181+
, flow "then you can add to the value of its"
1182+
, style Shell "packages"
1183+
, "key."
11811184
]
11821185
, ""
11831186
]

src/Stack/Init.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,8 @@ renderStackYaml p ignoredPackages dupPackages =
376376
where
377377
convert v = B.byteString (Yaml.encode $ Yaml.object [(name, v)])
378378

379-
-- Some fields in stack.yaml are optional and may not be
380-
-- generated. For these, we provided commented out dummy
381-
-- values to go along with the comments.
379+
-- Some keys in stack.yaml are optional and may not be generated. For these,
380+
-- we provided commented out dummy values to go along with the comments.
382381
nonPresentValue "extra-deps" = Just "# extra-deps: []\n"
383382
nonPresentValue "flags" = Just "# flags: {}\n"
384383
nonPresentValue "extra-package-dbs" = Just "# extra-package-dbs: []\n"

src/Stack/Types/Snapshot.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ instance Exception TypesSnapshotException where
4343
]
4444
displayException (FilepathInDownloadedSnapshot url) = unlines
4545
[ "Error: [S-4865]"
46-
, "Downloaded snapshot specified a 'snapshot: { location: filepath }' "
47-
, "field, but filepaths are not allowed in downloaded snapshots.\n"
46+
, "Downloaded snapshot specified 'snapshot: { location: filepath }', "
47+
, "but filepaths are not allowed in downloaded snapshots.\n"
4848
, "Filepath specified: " ++ T.unpack url
4949
]
5050

0 commit comments

Comments
 (0)