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
f2de618b
Commit
f2de618b
authored
14 years ago
by
Duncan Coutts
Browse files
Options
Downloads
Patches
Plain Diff
Export the list of InstalledPackageInfo fields
To allow parsers & pretty-printers for extensions of the format.
parent
0a1b4810
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Distribution/InstalledPackageInfo.hs
+7
-5
7 additions, 5 deletions
Distribution/InstalledPackageInfo.hs
with
7 additions
and
5 deletions
Distribution/InstalledPackageInfo.hs
+
7
−
5
View file @
f2de618b
...
...
@@ -61,6 +61,7 @@ module Distribution.InstalledPackageInfo (
parseInstalledPackageInfo
,
showInstalledPackageInfo
,
showInstalledPackageInfoField
,
fieldsInstalledPackageInfo
,
)
where
import
Distribution.ParseUtils
...
...
@@ -170,22 +171,23 @@ noVersion = Version{ versionBranch=[], versionTags=[] }
-- Parsing
parseInstalledPackageInfo
::
String
->
ParseResult
InstalledPackageInfo
parseInstalledPackageInfo
=
parseFieldsFlat
all_fields
emptyInstalledPackageInfo
parseInstalledPackageInfo
=
parseFieldsFlat
fieldsInstalledPackageInfo
emptyInstalledPackageInfo
-- -----------------------------------------------------------------------------
-- Pretty-printing
showInstalledPackageInfo
::
InstalledPackageInfo
->
String
showInstalledPackageInfo
=
showFields
all_
fields
showInstalledPackageInfo
=
showFields
fields
InstalledPackageInfo
showInstalledPackageInfoField
::
String
->
Maybe
(
InstalledPackageInfo
->
String
)
showInstalledPackageInfoField
=
showSingleNamedField
all_
fields
showInstalledPackageInfoField
=
showSingleNamedField
fields
InstalledPackageInfo
-- -----------------------------------------------------------------------------
-- Description of the fields, for parsing/printing
all_
fields
::
[
FieldDescr
InstalledPackageInfo
]
all_
fields
=
basicFieldDescrs
++
installedFieldDescrs
fields
InstalledPackageInfo
::
[
FieldDescr
InstalledPackageInfo
]
fields
InstalledPackageInfo
=
basicFieldDescrs
++
installedFieldDescrs
basicFieldDescrs
::
[
FieldDescr
InstalledPackageInfo
]
basicFieldDescrs
=
...
...
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