Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
1df9ce0a
Commit
1df9ce0a
authored
1 year ago
by
Artem Pelenitsyn
Browse files
Options
Downloads
Patches
Plain Diff
Fix fourmolu
parent
6eed6f5d
Branches
fix-fourmolu-2023-07-15
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cabal-install/src/Distribution/Client/List.hs
+59
-53
59 additions, 53 deletions
cabal-install/src/Distribution/Client/List.hs
cabal-install/src/Distribution/Client/ProjectPlanOutput.hs
+5
-6
5 additions, 6 deletions
cabal-install/src/Distribution/Client/ProjectPlanOutput.hs
with
64 additions
and
59 deletions
cabal-install/src/Distribution/Client/List.hs
+
59
−
53
View file @
1df9ce0a
...
@@ -431,25 +431,28 @@ showPackageSummaryInfo pkginfo =
...
@@ -431,25 +431,28 @@ showPackageSummaryInfo pkginfo =
renderStyle
(
style
{
lineLength
=
80
,
ribbonsPerLine
=
1
})
$
renderStyle
(
style
{
lineLength
=
80
,
ribbonsPerLine
=
1
})
$
char
'*'
char
'*'
<+>
pretty
(
pkgName
pkginfo
)
<+>
pretty
(
pkgName
pkginfo
)
$+$
nest
4
(
vcat
$+$
nest
[
maybeShowST
(
synopsis
pkginfo
)
"Synopsis:"
reflowParagraphs
4
,
text
"Default available version:"
(
vcat
<+>
case
selectedSourcePkg
pkginfo
of
[
maybeShowST
(
synopsis
pkginfo
)
"Synopsis:"
reflowParagraphs
Nothing
->
text
"[ Not available from any configured repository ]"
,
text
"Default available version:"
Just
pkg
->
pretty
(
packageVersion
pkg
)
<+>
case
selectedSourcePkg
pkginfo
of
,
text
"Installed versions:"
Nothing
->
text
"[ Not available from any configured repository ]"
<+>
case
installedVersions
pkginfo
of
Just
pkg
->
pretty
(
packageVersion
pkg
)
[]
,
text
"Installed versions:"
|
hasLib
pkginfo
->
text
"[ Not installed ]"
<+>
case
installedVersions
pkginfo
of
|
otherwise
->
text
"[ Unknown ]"
[]
versions
->
|
hasLib
pkginfo
->
text
"[ Not installed ]"
dispTopVersions
|
otherwise
->
text
"[ Unknown ]"
4
versions
->
(
preferredVersions
pkginfo
)
dispTopVersions
versions
4
,
maybeShowST
(
homepage
pkginfo
)
"Homepage:"
text
(
preferredVersions
pkginfo
)
,
text
"License: "
<+>
either
pretty
pretty
(
license
pkginfo
)
versions
])
,
maybeShowST
(
homepage
pkginfo
)
"Homepage:"
text
,
text
"License: "
<+>
either
pretty
pretty
(
license
pkginfo
)
]
)
$+$
text
""
$+$
text
""
where
where
maybeShowST
l
s
f
maybeShowST
l
s
f
...
@@ -464,41 +467,44 @@ showPackageDetailedInfo pkginfo =
...
@@ -464,41 +467,44 @@ showPackageDetailedInfo pkginfo =
<<>>
maybe
Disp
.
empty
(
\
v
->
char
'-'
Disp
.<>
pretty
v
)
(
selectedVersion
pkginfo
)
<<>>
maybe
Disp
.
empty
(
\
v
->
char
'-'
Disp
.<>
pretty
v
)
(
selectedVersion
pkginfo
)
<+>
text
(
replicate
(
16
-
length
(
prettyShow
(
pkgName
pkginfo
)))
' '
)
<+>
text
(
replicate
(
16
-
length
(
prettyShow
(
pkgName
pkginfo
)))
' '
)
<<>>
parens
pkgkind
<<>>
parens
pkgkind
$+$
nest
4
(
vcat
$+$
nest
[
entryST
"Synopsis"
synopsis
hideIfNull
reflowParagraphs
4
,
entry
(
vcat
"Versions available"
[
entryST
"Synopsis"
synopsis
hideIfNull
reflowParagraphs
sourceVersions
,
entry
(
altText
null
"[ Not available from server ]"
)
"Versions available"
(
dispTopVersions
9
(
preferredVersions
pkginfo
))
sourceVersions
,
entry
(
altText
null
"[ Not available from server ]"
)
"Versions installed"
(
dispTopVersions
9
(
preferredVersions
pkginfo
))
installedVersions
,
entry
(
altText
"Versions installed"
null
installedVersions
(
if
hasLib
pkginfo
(
altText
then
"[ Not installed ]"
null
else
"[ Unknown ]"
(
if
hasLib
pkginfo
)
then
"[ Not installed ]"
else
"[ Unknown ]"
)
)
(
dispTopVersions
4
(
preferredVersions
pkginfo
))
)
,
entryST
"Homepage"
homepage
orNotSpecified
text
(
dispTopVersions
4
(
preferredVersions
pkginfo
))
,
entryST
"Bug reports"
bugReports
orNotSpecified
text
,
entryST
"Homepage"
homepage
orNotSpecified
text
,
entryST
"Description"
description
hideIfNull
reflowParagraphs
,
entryST
"Bug reports"
bugReports
orNotSpecified
text
,
entryST
"Category"
category
hideIfNull
text
,
entryST
"Description"
description
hideIfNull
reflowParagraphs
,
entry
"License"
license
alwaysShow
(
either
pretty
pretty
)
,
entryST
"Category"
category
hideIfNull
text
,
entryST
"Author"
author
hideIfNull
reflowLines
,
entry
"License"
license
alwaysShow
(
either
pretty
pretty
)
,
entryST
"Maintainer"
maintainer
hideIfNull
reflowLines
,
entryST
"Author"
author
hideIfNull
reflowLines
,
entry
"Source repo"
sourceRepo
orNotSpecified
text
,
entryST
"Maintainer"
maintainer
hideIfNull
reflowLines
,
entry
"Executables"
executables
hideIfNull
(
commaSep
pretty
)
,
entry
"Source repo"
sourceRepo
orNotSpecified
text
,
entry
"Flags"
flags
hideIfNull
(
commaSep
dispFlag
)
,
entry
"Executables"
executables
hideIfNull
(
commaSep
pretty
)
,
entry
"Dependencies"
dependencies
hideIfNull
(
commaSep
dispExtDep
)
,
entry
"Flags"
flags
hideIfNull
(
commaSep
dispFlag
)
,
entry
"Documentation"
haddockHtml
showIfInstalled
text
,
entry
"Dependencies"
dependencies
hideIfNull
(
commaSep
dispExtDep
)
,
entry
"Cached"
haveTarball
alwaysShow
dispYesNo
,
entry
"Documentation"
haddockHtml
showIfInstalled
text
,
if
not
(
hasLib
pkginfo
)
,
entry
"Cached"
haveTarball
alwaysShow
dispYesNo
then
mempty
,
if
not
(
hasLib
pkginfo
)
else
text
"Modules:"
$+$
nest
4
(
vcat
(
map
pretty
.
sort
.
modules
$
pkginfo
))
then
mempty
])
else
text
"Modules:"
$+$
nest
4
(
vcat
(
map
pretty
.
sort
.
modules
$
pkginfo
))
]
)
$+$
text
""
$+$
text
""
where
where
entry
fname
field
cond
format
=
case
cond
(
field
pkginfo
)
of
entry
fname
field
cond
format
=
case
cond
(
field
pkginfo
)
of
...
...
This diff is collapsed.
Click to expand it.
cabal-install/src/Distribution/Client/ProjectPlanOutput.hs
+
5
−
6
View file @
1df9ce0a
...
@@ -194,12 +194,11 @@ encodePlanAsJson distDirLayout elaboratedInstallPlan elaboratedSharedConfig =
...
@@ -194,12 +194,11 @@ encodePlanAsJson distDirLayout elaboratedInstallPlan elaboratedSharedConfig =
J
.
object
$
J
.
object
$
[
comp2str
c
[
comp2str
c
J
..=
J
.
object
J
..=
J
.
object
(
(
[
"depends"
J
..=
map
(
jdisplay
.
confInstId
)
(
map
fst
ldeps
)
[
"depends"
J
..=
map
(
jdisplay
.
confInstId
)
(
map
fst
ldeps
)
,
"exe-depends"
J
..=
map
(
jdisplay
.
confInstId
)
edeps
,
"exe-depends"
J
..=
map
(
jdisplay
.
confInstId
)
edeps
]
]
++
bin_file
c
++
bin_file
c
)
)
|
(
c
,
(
ldeps
,
edeps
))
<-
|
(
c
,
(
ldeps
,
edeps
))
<-
ComponentDeps
.
toList
$
ComponentDeps
.
toList
$
ComponentDeps
.
zip
ComponentDeps
.
zip
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment