Skip to content

Commit 65aa389

Browse files
committed
Hush doctest
1 parent e44f74f commit 65aa389

File tree

1 file changed

+20
-20
lines changed
  • Cabal/src/Distribution/PackageDescription

1 file changed

+20
-20
lines changed

Cabal/src/Distribution/PackageDescription/Check.hs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ checkGenericPackageDescription
196196
condLibrary_ condSubLibraries_ condForeignLibs_ condExecutables_
197197
condTestSuites_ condBenchmarks_)
198198
= do
199-
-- * Description and names.
199+
-- § Description and names.
200200
checkPackageDescription packageDescription_
201201
-- Targets should be present...
202202
let condAllLibraries = maybeToList condLibrary_ ++
@@ -219,13 +219,13 @@ checkGenericPackageDescription
219219
-- Flag names.
220220
mapM_ checkFlagName genPackageFlags_
221221

222-
-- * Feature checks.
222+
-- § Feature checks.
223223
checkSpecVer CabalSpecV2_0 (not . null $ condSubLibraries_)
224224
(PackageDistInexcusable CVMultiLib)
225225
checkSpecVer CabalSpecV1_8 (not . null $ condTestSuites_)
226226
(PackageDistInexcusable CVTestSuite)
227227

228-
-- * Conditional targets
228+
-- § Conditional targets
229229
case condLibrary_ of
230230
Just cl -> checkCondTarget
231231
genPackageFlags_
@@ -295,7 +295,7 @@ checkPackageDescription
295295
_subLibraries_ _executables_ _foreignLibs_ _testSuites_ _benchmarks_
296296
dataFiles_ dataDir_ extraSrcFiles_ extraTmpFiles_ extraDocFiles_) = do
297297

298-
-- * Sanity checks.
298+
-- § Sanity checks.
299299
checkPackageId package_
300300
-- TODO `name` is caught at parse level, remove this test.
301301
let pn = packageName package_
@@ -309,7 +309,7 @@ checkPackageDescription
309309
checkP (any (== prettyShow pn) (prettyShow <$> nsubs))
310310
(PackageBuildImpossible $ IllegalLibraryName pn)
311311

312-
-- * Fields check.
312+
-- § Fields check.
313313
checkNull category_
314314
(PackageDistSuspicious $ MissingField CEFCategory)
315315
checkNull maintainer_
@@ -326,7 +326,7 @@ checkPackageDescription
326326
ShortText.length description_ <= ShortText.length synopsis_)
327327
(PackageDistSuspicious ShortDesc)
328328

329-
-- * Paths.
329+
-- § Paths.
330330
mapM_ (checkPath False "extra-source-files" PathKindGlob) extraSrcFiles_
331331
mapM_ (checkPath False "extra-tmp-files" PathKindFile) extraTmpFiles_
332332
mapM_ (checkPath False "extra-doc-files" PathKindGlob) extraDocFiles_
@@ -340,7 +340,7 @@ checkPackageDescription
340340
mapM_ (checkGlob "extra-source-files") extraSrcFiles_
341341
mapM_ (checkGlob "extra-doc-files") extraDocFiles_
342342

343-
-- * Datafield checks.
343+
-- § Datafield checks.
344344
checkSetupBuildInfo setupBuildInfo_
345345
mapM_ checkTestedWith testedWith_
346346
either checkNewLicense
@@ -567,7 +567,7 @@ checkLibrary isSub lib@(Library
567567
(view L.autogenIncludes lib)) $
568568
(PackageBuildImpossible AutogenIncludesNotIncluded)
569569

570-
-- * Build infos.
570+
-- § Build infos.
571571
checkBuildInfo BITLib (explicitLibModules lib) libBuildInfo_
572572

573573
-- Feature checks.
@@ -591,7 +591,7 @@ checkForeignLib (ForeignLib
591591
checkExecutable :: Monad m => PackageId -> Executable -> CheckM m ()
592592
checkExecutable pid exe@(Executable
593593
exeName_ modulePath_ _exeScope_ buildInfo_) = do
594-
-- * Exe specific checks
594+
-- § Exe specific checks
595595
checkP (null modulePath_)
596596
(PackageBuildImpossible (NoMainIs exeName_))
597597
-- This check does not apply to scripts.
@@ -600,7 +600,7 @@ checkExecutable pid exe@(Executable
600600
not (fileExtensionSupportedLanguage $ modulePath_))
601601
(PackageBuildImpossible NoHsLhsMain)
602602

603-
-- * Features check
603+
-- § Features check
604604
checkSpecVer CabalSpecV1_18
605605
(fileExtensionSupportedLanguage modulePath_ &&
606606
takeExtension modulePath_ `notElem` [".hs", ".lhs"])
@@ -614,14 +614,14 @@ checkExecutable pid exe@(Executable
614614
(view L.autogenIncludes exe))
615615
(PackageBuildImpossible AutogenIncludesNotIncludedExe)
616616

617-
-- * Build info checks.
617+
-- § Build info checks.
618618
checkBuildInfo BITOther [] buildInfo_
619619

620620
checkTestSuite :: Monad m => TestSuite -> CheckM m ()
621621
checkTestSuite ts@(TestSuite
622622
testName_ testInterface_ testBuildInfo_
623623
_testCodeGenerators_) = do
624-
-- * TS specific checks.
624+
-- § TS specific checks.
625625
-- TODO caught by the parser, can remove safely
626626
case testInterface_ of
627627
TestSuiteUnsupported tt@(TestTypeUnknown _ _) ->
@@ -638,12 +638,12 @@ checkTestSuite ts@(TestSuite
638638
(view L.autogenIncludes ts))
639639
(PackageBuildImpossible AutogenIncludesNotIncludedExe)
640640

641-
-- * Feature checks.
641+
-- § Feature checks.
642642
checkSpecVer CabalSpecV1_18
643643
(mainIsNotHsExt && not mainIsWrongExt)
644644
(PackageDistInexcusable MainCCabal1_18)
645645

646-
-- * Build info checks.
646+
-- § Build info checks.
647647
checkBuildInfo BITTestBench [] testBuildInfo_
648648
where
649649
mainIsWrongExt =
@@ -660,7 +660,7 @@ checkBenchmark :: Monad m => Benchmark -> CheckM m ()
660660
checkBenchmark bm@(Benchmark
661661
benchmarkName_ benchmarkInterface_
662662
benchmarkBuildInfo_) = do
663-
-- * Interface & bm specific tests.
663+
-- § Interface & bm specific tests.
664664
case benchmarkInterface_ of
665665
BenchmarkUnsupported tt@(BenchmarkTypeUnknown _ _) ->
666666
tellP (PackageBuildWarning $ BenchmarkTypeNotKnown tt)
@@ -678,7 +678,7 @@ checkBenchmark bm@(Benchmark
678678
(view L.autogenIncludes bm))
679679
(PackageBuildImpossible AutogenIncludesNotIncludedExe)
680680

681-
-- * BuildInfo checks.
681+
-- § BuildInfo checks.
682682
checkBuildInfo BITTestBench [] benchmarkBuildInfo_
683683
where
684684
-- Cannot abstract with similar function in checkTestSuite,
@@ -708,7 +708,7 @@ data BITarget = BITLib | BITTestBench | BITOther
708708
checkBuildInfo :: Monad m => BITarget -> [ModuleName] -> BuildInfo ->
709709
CheckM m ()
710710
checkBuildInfo t ams bi = do
711-
-- * Options.
711+
-- § Options.
712712
checkGHCOptions "ghc-options" t (hcOptions GHC bi)
713713
checkGHCOptions "ghc-prof-options" t (hcProfOptions GHC bi)
714714
checkGHCOptions "ghc-shared-options" t (hcSharedOptions GHC bi)
@@ -717,7 +717,7 @@ checkBuildInfo t ams bi = do
717717
checkCLikeOptions "C++" "cxx-options" (cxxOptions bi) ldOpts
718718
checkCPPOptions (cppOptions bi)
719719

720-
-- * Paths: content.
720+
-- § Paths: content.
721721
mapM_ checkLang (allLanguages bi)
722722
mapM_ checkExt (allExtensions bi)
723723
mapM_ checkDep (targetBuildDepends bi)
@@ -726,7 +726,7 @@ checkBuildInfo t ams bi = do
726726
let ds = buildToolDepends bi ++ catMaybes (map df $ buildTools bi)
727727
mapM_ checkBTDep ds
728728

729-
-- * Paths: well formedness
729+
-- § Paths: well formedness
730730
mapM_ (checkPath False "asm-sources" PathKindFile) (asmSources bi)
731731
mapM_ (checkPath False "cmm-sources" PathKindFile) (cmmSources bi)
732732
mapM_ (checkPath False "c-sources" PathKindFile) (cSources bi)
@@ -746,7 +746,7 @@ checkBuildInfo t ams bi = do
746746
(extraLibDirsStatic bi)
747747
mapM_ checkOptionPath (perCompilerFlavorToList $ options bi)
748748

749-
-- * Feature checks --
749+
-- § Feature checks --
750750
sv <- asksCM ccSpecVersion
751751
checkSpecVer CabalSpecV1_10 (isJust $ defaultLanguage bi)
752752
(PackageBuildWarning CVDefaultLanguage)

0 commit comments

Comments
 (0)