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
GHC
Commits
3ea149ad
Commit
3ea149ad
authored
Apr 28, 2017
by
Zhen Zhang
Committed by
Andrey Mokhov
Apr 28, 2017
Browse files
Disable some warnings (
#307
)
parent
c4e2e45b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Settings/Default.hs
View file @
3ea149ad
...
...
@@ -215,6 +215,43 @@ defaultBuilderArgs = mconcat
,
makeBuilderArgs
,
tarBuilderArgs
]
-- | Disable some warnings in packages we use
-- | https://github.com/ghc/ghc/blob/master/mk/warnings.mk#L46
disableWarningArgsStage0
::
Args
disableWarningArgsStage0
=
stage
Stage0
?
builder
Ghc
?
mconcat
[
package
transformers
?
append
[
"-fno-warn-unused-matches"
,
"-fno-warn-unused-imports"
]
,
package
terminfo
?
append
[
"-fno-warn-unused-imports"
]
]
disableWarningArgsStage1
::
Args
disableWarningArgsStage1
=
notStage0
?
builder
Ghc
?
mconcat
[
package
bytestring
?
append
[
"-Wno-inline-rule-shadowing"
]
,
package
haddock
?
append
[
"-Wno-unused-imports"
,
"-Wno-deprecations"
]
,
package
directory
?
append
[
"-Wno-unused-imports"
]
,
package
binary
?
append
[
"-Wno-deprecations"
]
,
package
haskeline
?
append
[
"-Wno-deprecations"
,
"-Wno-unused-imports"
,
"-Wno-redundant-constraints"
,
"-Wno-simplifiable-class-constraints"
]
,
package
pretty
?
append
[
"-Wno-unused-imports"
]
,
package
primitive
?
append
[
"-Wno-unused-imports"
,
"-Wno-deprecations"
]
,
package
terminfo
?
append
[
"-Wno-unused-imports"
]
,
package
xhtml
?
append
[
"-Wno-unused-imports"
,
"-Wno-tabs"
]
,
package
transformers
?
append
[
"-Wno-unused-matches"
,
"-Wno-unused-imports"
,
"-Wno-redundant-constraints"
,
"-Wno-orphans"
]
,
package
base
?
append
[
"-Wno-trustworthy-safe"
]
,
package
ghcPrim
?
append
[
"-Wno-trustworthy-safe"
]
,
package
win32
?
append
[
"-Wno-trustworthy-safe"
]
]
-- GhcLibExtraHcOpts += -Wno-deprecated-flags
-- GhcBootLibExtraHcOpts += -fno-warn-deprecated-flags
disableWarningArgsLibs
::
Args
disableWarningArgsLibs
=
do
pkg
<-
getPackage
isLibrary
pkg
?
builder
Ghc
?
mconcat
[
notStage0
?
arg
"-Wno-deprecated-flags"
,
stage
Stage0
?
arg
"-fno-warn-deprecated-flags"
]
-- TODO: Disable warnings for Windows specifics
-- | All 'Package'-dependent command line arguments.
defaultPackageArgs
::
Args
defaultPackageArgs
=
mconcat
...
...
@@ -227,4 +264,7 @@ defaultPackageArgs = mconcat
,
haddockPackageArgs
,
integerGmpPackageArgs
,
rtsPackageArgs
,
runGhcPackageArgs
]
,
runGhcPackageArgs
,
disableWarningArgsStage0
,
disableWarningArgsStage1
,
disableWarningArgsLibs
]
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