Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Cabal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
301827e8
Commit
301827e8
authored
May 11, 2020
by
Oleg Grenrus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Pretty in D.S.T.PackagePath
parent
f1a4a693
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
cabal-install/Distribution/Solver/Types/PackagePath.hs
cabal-install/Distribution/Solver/Types/PackagePath.hs
+7
-7
No files found.
cabal-install/Distribution/Solver/Types/PackagePath.hs
View file @
301827e8
...
...
@@ -10,7 +10,7 @@ module Distribution.Solver.Types.PackagePath
)
where
import
Distribution.Package
import
Distribution.
Deprecated.Text
import
Distribution.
Pretty
(
pretty
,
flatStyle
)
import
qualified
Text.PrettyPrint
as
Disp
import
Distribution.Solver.Compat.Prelude
((
<<>>
))
...
...
@@ -35,7 +35,7 @@ data Namespace =
-- ends in a period, so it can be prepended onto a qualifier.
dispNamespace
::
Namespace
->
Disp
.
Doc
dispNamespace
DefaultNamespace
=
Disp
.
empty
dispNamespace
(
Independent
i
)
=
disp
i
<<>>
Disp
.
text
"."
dispNamespace
(
Independent
i
)
=
pretty
i
<<>>
Disp
.
text
"."
-- | Qualifier of a package within a namespace (see 'PackagePath')
data
Qualifier
=
...
...
@@ -79,10 +79,10 @@ data Qualifier =
-- 'Base' qualifier, will always be @base@).
dispQualifier
::
Qualifier
->
Disp
.
Doc
dispQualifier
QualToplevel
=
Disp
.
empty
dispQualifier
(
QualSetup
pn
)
=
disp
pn
<<>>
Disp
.
text
":setup."
dispQualifier
(
QualExe
pn
pn2
)
=
disp
pn
<<>>
Disp
.
text
":"
<<>>
disp
pn2
<<>>
Disp
.
text
":exe."
dispQualifier
(
QualBase
pn
)
=
disp
pn
<<>>
Disp
.
text
"."
dispQualifier
(
QualSetup
pn
)
=
pretty
pn
<<>>
Disp
.
text
":setup."
dispQualifier
(
QualExe
pn
pn2
)
=
pretty
pn
<<>>
Disp
.
text
":"
<<>>
pretty
pn2
<<>>
Disp
.
text
":exe."
dispQualifier
(
QualBase
pn
)
=
pretty
pn
<<>>
Disp
.
text
"."
-- | A qualified entity. Pairs a package path with the entity.
data
Qualified
a
=
Q
PackagePath
a
...
...
@@ -94,7 +94,7 @@ type QPN = Qualified PackageName
-- | Pretty-prints a qualified package name.
dispQPN
::
QPN
->
Disp
.
Doc
dispQPN
(
Q
(
PackagePath
ns
qual
)
pn
)
=
dispNamespace
ns
<<>>
dispQualifier
qual
<<>>
disp
pn
dispNamespace
ns
<<>>
dispQualifier
qual
<<>>
pretty
pn
-- | String representation of a qualified package name.
showQPN
::
QPN
->
String
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment