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
060a9601
Commit
060a9601
authored
7 years ago
by
Oleg Grenrus
Browse files
Options
Downloads
Patches
Plain Diff
Update meta to work on GHC-8.2.1
parent
069a641e
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
.travis.yml
+1
-1
1 addition, 1 deletion
.travis.yml
Cabal/misc/gen-extra-source-files.hs
+8
-13
8 additions, 13 deletions
Cabal/misc/gen-extra-source-files.hs
with
9 additions
and
14 deletions
.travis.yml
+
1
−
1
View file @
060a9601
...
...
@@ -26,7 +26,7 @@ branches:
# TAGSUFFIX to help travis/upload.sh disambiguate the matrix entry.
matrix
:
include
:
-
env
:
GHCVER=8.
0.2
SCRIPT=meta BUILDER=none
-
env
:
GHCVER=8.
2.1
SCRIPT=meta BUILDER=none
os
:
linux
sudo
:
required
# These don't have -dyn/-prof whitelisted yet, so we have to
...
...
This diff is collapsed.
Click to expand it.
Cabal/misc/gen-extra-source-files.hs
+
8
−
13
View file @
060a9601
#!/
usr
/
bin
/
env
runhaskell
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE CPP, PackageImports #-}
#
if
!
MIN_VERSION_Cabal
(
2
,
0
,
0
)
#
error
"Run this with Cabal >= 2.0"
#
endif
-- NB: Force an installed Cabal package to be used, NOT
-- some local files which have these names (as would be
-- the case if we were in the Cabal source directory.)
import
"Cabal"
Distribution.PackageDescription
import
"Cabal"
Distribution.PackageDescription.Parse
(
ParseResult
(
..
),
parsePackageDescription
)
import
"Cabal"
Distribution.PackageDescription.Parse
(
ParseResult
(
..
),
parse
Generic
PackageDescription
)
import
"Cabal"
Distribution.Verbosity
(
silent
)
import
qualified
"Cabal"
Distribution.ModuleName
as
ModuleName
...
...
@@ -20,7 +24,7 @@ main' :: FilePath -> IO ()
main'
fp
=
do
-- Read cabal file, so we can determine test modules
contents
<-
strictReadFile
fp
cabal
<-
case
parsePackageDescription
contents
of
cabal
<-
case
parse
Generic
PackageDescription
contents
of
ParseOk
_
x
->
pure
x
ParseFailed
errs
->
fail
(
show
errs
)
...
...
@@ -71,7 +75,7 @@ getOtherModulesFiles :: GenericPackageDescription -> [FilePath]
getOtherModulesFiles
gpd
=
mainModules
++
map
fromModuleName
otherModules'
where
testSuites
::
[
TestSuite
]
testSuites
=
map
(
foldMap
CondTree
id
.
snd
)
(
condTestSuites
gpd
)
testSuites
=
map
(
foldMap
id
.
snd
)
(
condTestSuites
gpd
)
mainModules
=
concatMap
(
mainModule
.
testInterface
)
testSuites
otherModules'
=
concatMap
(
otherModules
.
testBuildInfo
)
testSuites
...
...
@@ -106,12 +110,3 @@ strictReadFile fp = do
return
contents
where
get
h
=
IO
.
hGetContents
h
>>=
\
s
->
length
s
`
seq
`
return
s
foldMapCondTree
::
Monoid
m
=>
(
a
->
m
)
->
CondTree
v
c
a
->
m
foldMapCondTree
f
(
CondNode
x
_
cs
)
=
mappend
(
f
x
)
-- list, 3-tuple+maybe
$
(
foldMap
.
foldMapTriple
.
foldMapCondTree
)
f
cs
where
foldMapTriple
::
Monoid
x
=>
(
b
->
x
)
->
(
a
,
b
,
Maybe
b
)
->
x
foldMapTriple
f
(
_
,
x
,
y
)
=
mappend
(
f
x
)
(
foldMap
f
y
)
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