@@ -431,25 +431,28 @@ showPackageSummaryInfo pkginfo =
431431 renderStyle (style{lineLength = 80 , ribbonsPerLine = 1 }) $
432432 char ' *'
433433 <+> pretty (pkgName pkginfo)
434- $+$ nest 4 (vcat
435- [ maybeShowST (synopsis pkginfo) " Synopsis:" reflowParagraphs
436- , text " Default available version:"
437- <+> case selectedSourcePkg pkginfo of
438- Nothing -> text " [ Not available from any configured repository ]"
439- Just pkg -> pretty (packageVersion pkg)
440- , text " Installed versions:"
441- <+> case installedVersions pkginfo of
442- []
443- | hasLib pkginfo -> text " [ Not installed ]"
444- | otherwise -> text " [ Unknown ]"
445- versions ->
446- dispTopVersions
447- 4
448- (preferredVersions pkginfo)
449- versions
450- , maybeShowST (homepage pkginfo) " Homepage:" text
451- , text " License: " <+> either pretty pretty (license pkginfo)
452- ])
434+ $+$ nest
435+ 4
436+ ( vcat
437+ [ maybeShowST (synopsis pkginfo) " Synopsis:" reflowParagraphs
438+ , text " Default available version:"
439+ <+> case selectedSourcePkg pkginfo of
440+ Nothing -> text " [ Not available from any configured repository ]"
441+ Just pkg -> pretty (packageVersion pkg)
442+ , text " Installed versions:"
443+ <+> case installedVersions pkginfo of
444+ []
445+ | hasLib pkginfo -> text " [ Not installed ]"
446+ | otherwise -> text " [ Unknown ]"
447+ versions ->
448+ dispTopVersions
449+ 4
450+ (preferredVersions pkginfo)
451+ versions
452+ , maybeShowST (homepage pkginfo) " Homepage:" text
453+ , text " License: " <+> either pretty pretty (license pkginfo)
454+ ]
455+ )
453456 $+$ text " "
454457 where
455458 maybeShowST l s f
@@ -464,41 +467,44 @@ showPackageDetailedInfo pkginfo =
464467 <<>> maybe Disp. empty (\ v -> char ' -' Disp. <> pretty v) (selectedVersion pkginfo)
465468 <+> text (replicate (16 - length (prettyShow (pkgName pkginfo))) ' ' )
466469 <<>> parens pkgkind
467- $+$ nest 4 (vcat
468- [ entryST " Synopsis" synopsis hideIfNull reflowParagraphs
469- , entry
470- " Versions available"
471- sourceVersions
472- (altText null " [ Not available from server ]" )
473- (dispTopVersions 9 (preferredVersions pkginfo))
474- , entry
475- " Versions installed"
476- installedVersions
477- ( altText
478- null
479- ( if hasLib pkginfo
480- then " [ Not installed ]"
481- else " [ Unknown ]"
482- )
470+ $+$ nest
471+ 4
472+ ( vcat
473+ [ entryST " Synopsis" synopsis hideIfNull reflowParagraphs
474+ , entry
475+ " Versions available"
476+ sourceVersions
477+ (altText null " [ Not available from server ]" )
478+ (dispTopVersions 9 (preferredVersions pkginfo))
479+ , entry
480+ " Versions installed"
481+ installedVersions
482+ ( altText
483+ null
484+ ( if hasLib pkginfo
485+ then " [ Not installed ]"
486+ else " [ Unknown ]"
483487 )
484- (dispTopVersions 4 (preferredVersions pkginfo))
485- , entryST " Homepage" homepage orNotSpecified text
486- , entryST " Bug reports" bugReports orNotSpecified text
487- , entryST " Description" description hideIfNull reflowParagraphs
488- , entryST " Category" category hideIfNull text
489- , entry " License" license alwaysShow (either pretty pretty)
490- , entryST " Author" author hideIfNull reflowLines
491- , entryST " Maintainer" maintainer hideIfNull reflowLines
492- , entry " Source repo" sourceRepo orNotSpecified text
493- , entry " Executables" executables hideIfNull (commaSep pretty)
494- , entry " Flags" flags hideIfNull (commaSep dispFlag)
495- , entry " Dependencies" dependencies hideIfNull (commaSep dispExtDep)
496- , entry " Documentation" haddockHtml showIfInstalled text
497- , entry " Cached" haveTarball alwaysShow dispYesNo
498- , if not (hasLib pkginfo)
499- then mempty
500- else text " Modules:" $+$ nest 4 (vcat (map pretty . sort . modules $ pkginfo))
501- ])
488+ )
489+ (dispTopVersions 4 (preferredVersions pkginfo))
490+ , entryST " Homepage" homepage orNotSpecified text
491+ , entryST " Bug reports" bugReports orNotSpecified text
492+ , entryST " Description" description hideIfNull reflowParagraphs
493+ , entryST " Category" category hideIfNull text
494+ , entry " License" license alwaysShow (either pretty pretty)
495+ , entryST " Author" author hideIfNull reflowLines
496+ , entryST " Maintainer" maintainer hideIfNull reflowLines
497+ , entry " Source repo" sourceRepo orNotSpecified text
498+ , entry " Executables" executables hideIfNull (commaSep pretty)
499+ , entry " Flags" flags hideIfNull (commaSep dispFlag)
500+ , entry " Dependencies" dependencies hideIfNull (commaSep dispExtDep)
501+ , entry " Documentation" haddockHtml showIfInstalled text
502+ , entry " Cached" haveTarball alwaysShow dispYesNo
503+ , if not (hasLib pkginfo)
504+ then mempty
505+ else text " Modules:" $+$ nest 4 (vcat (map pretty . sort . modules $ pkginfo))
506+ ]
507+ )
502508 $+$ text " "
503509 where
504510 entry fname field cond format = case cond (field pkginfo) of
0 commit comments