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
a94b3f54
Commit
a94b3f54
authored
2 years ago
by
Gershom Bazerman
Browse files
Options
Downloads
Patches
Plain Diff
ordNub for extra stanzas
parent
410f871d
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
Cabal/src/Distribution/Simple/Build.hs
+6
-23
6 additions, 23 deletions
Cabal/src/Distribution/Simple/Build.hs
with
6 additions
and
23 deletions
Cabal/src/Distribution/Simple/Build.hs
+
6
−
23
View file @
a94b3f54
...
@@ -89,7 +89,6 @@ import Distribution.Version (thisVersion)
...
@@ -89,7 +89,6 @@ import Distribution.Version (thisVersion)
import
Distribution.Compat.Graph
(
IsNode
(
..
))
import
Distribution.Compat.Graph
(
IsNode
(
..
))
import
Control.Monad
import
Control.Monad
import
qualified
Data.Set
as
Set
import
qualified
Data.ByteString.Lazy
as
LBS
import
qualified
Data.ByteString.Lazy
as
LBS
import
System.FilePath
(
(
</>
),
(
<.>
),
takeDirectory
)
import
System.FilePath
(
(
</>
),
(
<.>
),
takeDirectory
)
import
System.Directory
(
getCurrentDirectory
,
removeFile
,
doesFileExist
)
import
System.Directory
(
getCurrentDirectory
,
removeFile
,
doesFileExist
)
...
@@ -434,52 +433,36 @@ generateCode codeGens nm pdesc bi lbi clbi verbosity = do
...
@@ -434,52 +433,36 @@ generateCode codeGens nm pdesc bi lbi clbi verbosity = do
-- information.
-- information.
addExtraCSources
::
BuildInfo
->
[
FilePath
]
->
BuildInfo
addExtraCSources
::
BuildInfo
->
[
FilePath
]
->
BuildInfo
addExtraCSources
bi
extras
=
bi
{
cSources
=
new
}
addExtraCSources
bi
extras
=
bi
{
cSources
=
new
}
where
new
=
Set
.
toList
$
old
`
Set
.
union
`
exs
where
new
=
ordNub
(
extras
++
cSources
bi
)
old
=
Set
.
fromList
$
cSources
bi
exs
=
Set
.
fromList
extras
-- | Add extra C++ sources generated by preprocessing to build
-- | Add extra C++ sources generated by preprocessing to build
-- information.
-- information.
addExtraCxxSources
::
BuildInfo
->
[
FilePath
]
->
BuildInfo
addExtraCxxSources
::
BuildInfo
->
[
FilePath
]
->
BuildInfo
addExtraCxxSources
bi
extras
=
bi
{
cxxSources
=
new
}
addExtraCxxSources
bi
extras
=
bi
{
cxxSources
=
new
}
where
new
=
Set
.
toList
$
old
`
Set
.
union
`
exs
where
new
=
ordNub
(
extras
++
cxxSources
bi
)
old
=
Set
.
fromList
$
cxxSources
bi
exs
=
Set
.
fromList
extras
-- | Add extra C-- sources generated by preprocessing to build
-- | Add extra C-- sources generated by preprocessing to build
-- information.
-- information.
addExtraCmmSources
::
BuildInfo
->
[
FilePath
]
->
BuildInfo
addExtraCmmSources
::
BuildInfo
->
[
FilePath
]
->
BuildInfo
addExtraCmmSources
bi
extras
=
bi
{
cmmSources
=
new
}
addExtraCmmSources
bi
extras
=
bi
{
cmmSources
=
new
}
where
new
=
Set
.
toList
$
old
`
Set
.
union
`
exs
where
new
=
ordNub
(
extras
++
cmmSources
bi
)
old
=
Set
.
fromList
$
cmmSources
bi
exs
=
Set
.
fromList
extras
-- | Add extra ASM sources generated by preprocessing to build
-- | Add extra ASM sources generated by preprocessing to build
-- information.
-- information.
addExtraAsmSources
::
BuildInfo
->
[
FilePath
]
->
BuildInfo
addExtraAsmSources
::
BuildInfo
->
[
FilePath
]
->
BuildInfo
addExtraAsmSources
bi
extras
=
bi
{
asmSources
=
new
}
addExtraAsmSources
bi
extras
=
bi
{
asmSources
=
new
}
where
new
=
Set
.
toList
$
old
`
Set
.
union
`
exs
where
new
=
ordNub
(
extras
++
asmSources
bi
)
old
=
Set
.
fromList
$
asmSources
bi
exs
=
Set
.
fromList
extras
-- | Add extra HS modules generated by preprocessing to build
-- | Add extra HS modules generated by preprocessing to build
-- information.
-- information.
addExtraOtherModules
::
BuildInfo
->
[
ModuleName
.
ModuleName
]
->
BuildInfo
addExtraOtherModules
::
BuildInfo
->
[
ModuleName
.
ModuleName
]
->
BuildInfo
addExtraOtherModules
bi
extras
=
bi
{
otherModules
=
new
}
addExtraOtherModules
bi
extras
=
bi
{
otherModules
=
new
}
where
new
=
Set
.
toList
$
old
`
Set
.
union
`
exs
where
new
=
ordNub
(
extras
++
otherModules
bi
)
old
=
Set
.
fromList
$
otherModules
bi
exs
=
Set
.
fromList
extras
-- | Add extra source dir for generated modules.
-- | Add extra source dir for generated modules.
addSrcDir
::
BuildInfo
->
FilePath
->
BuildInfo
addSrcDir
::
BuildInfo
->
FilePath
->
BuildInfo
addSrcDir
bi
extra
=
bi
{
hsSourceDirs
=
new
}
addSrcDir
bi
extra
=
bi
{
hsSourceDirs
=
new
}
where
new
=
Set
.
toList
$
old
`
Set
.
union
`
ex
where
new
=
ordNub
(
unsafeMakeSymbolicPath
extra
:
hsSourceDirs
bi
)
old
=
Set
.
fromList
$
hsSourceDirs
bi
ex
=
Set
.
fromList
[
unsafeMakeSymbolicPath
extra
]
-- TODO
replComponent
::
ReplOptions
replComponent
::
ReplOptions
->
Verbosity
->
Verbosity
...
...
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