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
5c410b30
Commit
5c410b30
authored
8 years ago
by
Edward Z. Yang
Browse files
Options
Downloads
Patches
Plain Diff
showComponentTarget remove dependence on ElaboratedPackage.
Signed-off-by:
Edward Z. Yang
<
ezyang@cs.stanford.edu
>
parent
d9bf6788
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cabal-install/Distribution/Client/ProjectOrchestration.hs
+1
-1
1 addition, 1 deletion
cabal-install/Distribution/Client/ProjectOrchestration.hs
cabal-install/Distribution/Client/ProjectPlanning.hs
+6
-6
6 additions, 6 deletions
cabal-install/Distribution/Client/ProjectPlanning.hs
with
7 additions
and
7 deletions
cabal-install/Distribution/Client/ProjectOrchestration.hs
+
1
−
1
View file @
5c410b30
...
...
@@ -476,7 +476,7 @@ printPlan verbosity
showTargets
pkg
|
null
(
pkgBuildTargets
pkg
)
=
""
|
otherwise
=
" ("
++
unwords
[
showComponentTarget
pkg
t
|
t
<-
pkgBuildTargets
pkg
]
=
" ("
++
unwords
[
showComponentTarget
(
packageId
pkg
)
t
|
t
<-
pkgBuildTargets
pkg
]
++
")"
-- TODO: [code cleanup] this should be a proper function in a proper place
...
...
This diff is collapsed.
Click to expand it.
cabal-install/Distribution/Client/ProjectPlanning.hs
+
6
−
6
View file @
5c410b30
...
...
@@ -2172,7 +2172,7 @@ setupHsConfigureArgs :: ElaboratedConfiguredPackage
->
[
String
]
setupHsConfigureArgs
(
ElabPackage
_pkg
)
=
[]
setupHsConfigureArgs
(
ElabComponent
comp
)
=
[
showComponentTarget
pkg
(
ComponentTarget
cname
WholeComponent
)]
[
showComponentTarget
(
packageId
pkg
)
(
ComponentTarget
cname
WholeComponent
)]
where
pkg
=
elabComponentPackage
comp
cname
=
fromMaybe
(
error
"setupHsConfigureArgs: trying to configure setup"
)
...
...
@@ -2196,16 +2196,16 @@ setupHsBuildFlags _ _ verbosity builddir =
setupHsBuildArgs
::
ElaboratedConfiguredPackage
->
[
String
]
setupHsBuildArgs
(
ElabPackage
pkg
)
=
map
(
showComponentTarget
pkg
)
(
pkgBuildTargets
pkg
)
setupHsBuildArgs
(
ElabPackage
pkg
)
=
map
(
showComponentTarget
(
packageId
pkg
)
)
(
pkgBuildTargets
pkg
)
setupHsBuildArgs
(
ElabComponent
_comp
)
=
[]
showComponentTarget
::
Elaborated
Package
->
ComponentTarget
->
String
showComponentTarget
pkg
=
showComponentTarget
::
Package
Id
->
ComponentTarget
->
String
showComponentTarget
pkg
id
=
showBuildTarget
.
toBuildTarget
where
showBuildTarget
t
=
Cabal
.
showBuildTarget
(
qlBuildTarget
t
)
(
packageId
pkg
)
t
Cabal
.
showBuildTarget
(
qlBuildTarget
t
)
pkgid
t
qlBuildTarget
Cabal
.
BuildTargetComponent
{}
=
Cabal
.
QL2
qlBuildTarget
_
=
Cabal
.
QL3
...
...
@@ -2235,7 +2235,7 @@ setupHsReplFlags _ _ verbosity builddir =
setupHsReplArgs
::
ElaboratedConfiguredPackage
->
[
String
]
setupHsReplArgs
(
ElabPackage
pkg
)
=
maybe
[]
(
\
t
->
[
showComponentTarget
pkg
t
])
(
pkgReplTarget
pkg
)
maybe
[]
(
\
t
->
[
showComponentTarget
(
packageId
pkg
)
t
])
(
pkgReplTarget
pkg
)
--TODO: should be able to give multiple modules in one component
setupHsReplArgs
(
ElabComponent
_comp
)
=
error
"setupHsReplArgs: didn't implement me yet"
...
...
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