Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
4efe8c22
Commit
4efe8c22
authored
Oct 14, 2016
by
Oleg Grenrus
Committed by
GitHub
Oct 14, 2016
Browse files
Merge pull request #3981 from phadej/fix-gen-extra-sources
Fix gen-extra-source-files.hs
parents
f4969a0b
f50153b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Cabal/misc/gen-extra-source-files.hs
View file @
4efe8c22
...
...
@@ -66,7 +66,7 @@ getOtherModulesFiles :: GenericPackageDescription -> [FilePath]
getOtherModulesFiles
gpd
=
mainModules
++
map
fromModuleName
otherModules'
where
testSuites
::
[
TestSuite
]
testSuites
=
map
(
foldCondTree
.
snd
)
(
condTestSuites
gpd
)
testSuites
=
map
(
fold
Map
CondTree
id
.
snd
)
(
condTestSuites
gpd
)
mainModules
=
concatMap
(
mainModule
.
testInterface
)
testSuites
otherModules'
=
concatMap
(
otherModules
.
testBuildInfo
)
testSuites
...
...
@@ -104,11 +104,11 @@ strictReadFile fp = do
where
get
h
=
IO
.
hGetContents
h
>>=
\
s
->
length
s
`
seq
`
return
s
foldCondTree
::
Monoid
a
=
>
CondTree
v
c
a
->
a
foldCondTree
(
CondNode
x
_
cs
)
=
mappend
x
-- list, 3-tuple
,
maybe
$
(
foldMap
.
foldMapTriple
.
foldMap
)
fold
CondTree
cs
fold
Map
CondTree
::
Monoid
m
=>
(
a
->
m
)
-
>
CondTree
v
c
a
->
m
fold
Map
CondTree
f
(
CondNode
x
_
cs
)
=
mappend
(
f
x
)
-- list, 3-tuple
+
maybe
$
(
foldMap
.
foldMapTriple
.
foldMapCondTree
)
f
cs
where
foldMapTriple
::
(
c
->
x
)
->
(
a
,
b
,
c
)
->
x
foldMapTriple
f
(
_
,
_
,
x
)
=
f
x
foldMapTriple
::
Monoid
x
=>
(
b
->
x
)
->
(
a
,
b
,
Maybe
b
)
->
x
foldMapTriple
f
(
_
,
x
,
y
)
=
mappend
(
f
x
)
(
foldMap
f
y
)
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment