| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provoked by Trac #11948, this patch adds a new warning to GHC
-Wsimplifiable-class-constraints
It warns if you write a class constraint in a type signature that
can be simplified by an existing instance declaration. Almost always
this means you should simplify it right now; type inference is very
fragile without it, as #11948 shows.
I've put the warning as on-by-default, but I suppose that if there are
howls of protest we can move it out (as happened for -Wredundant-constraints.
It actually found an example of an over-complicated context in CmmNode.
Quite a few tests use these weird contexts to trigger something else,
so I had to suppress the warning in those.
The 'haskeline' library has a few occurrences of the warning (which
I think should be fixed), so I switched it off for that library in
warnings.mk.
The warning itself is done in TcValidity.check_class_pred.
HOWEVER, when type inference fails we get a type error; and the error
suppresses the (informative) warning. So as things stand, the warning
only happens when it doesn't cause a problem. Not sure what to do
about this, but this patch takes us forward, I think.
|
| |
|
|
|
|
|
|
|
| |
Most notably, this update pulls in documentation improvements
and several INLINE pragmas for significant performance gains[1].
[1]: https://groups.google.com/d/msg/haskell-cafe/SUKtkDI84EE/fXMBd-jNDQAJ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Makes the needed changes to make RemoteGHCi work on Windows.
The approach passes OS Handles areound instead of the Posix Fd
as on Linux.
The reason is that I could not find any real documentation about
the behaviour of Windows w.r.t inheritance and Posix FDs.
The implementation with Fd did not seem to be able to find the Fd
in the child process. Instead I'm using the much better documented
approach of passing inheriting handles.
This requires a small modification to the `process` library.
https://github.com/haskell/process/pull/52
Test Plan: ./validate On Windows x86_64
Reviewers: thomie, erikd, bgamari, simonmar, austin, hvr
Reviewed By: simonmar
Subscribers: #ghc_windows_task_force
Differential Revision: https://phabricator.haskell.org/D1836
GHC Trac Issues: #11100
|
| |
|
|
|
|
|
|
|
| |
Also, `binary` now is almost warning free
(except for inlinePerformIO deprecation warnings)
/cc @kolmodin
|
|
|
|
|
|
| |
This is the designated release to go with GHC 8.0.1
/cc @AshleyYakeley
|
|
|
|
|
|
|
| |
So far only `time` (fixed upstream already though) and `xhtml` still require
`-Wno-tabs`, so let's apply that warning suppression flag only there.
This also updates the haskeline submodule to pull in a tab-fix
|
|
|
|
|
|
|
|
|
| |
This is the designated release to go with GHC 8.0.1
This release doesn't need any warning-suppression flags anymore, so
remove those from mk/warnings.mk
/cc @foxik
|
|
|
|
|
| |
And fix a redundant constraint warning in a test that requires
primitive.
|
|
|
|
|
|
| |
Cabal is currently warning free. So let's drop the `-w`-flags.
/cc @dcoutts
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces some occurences of `-f(no-)warn` with the new `-W`-aliases
introduced via 2206fa8cdb120932 / #11218, in cases which are guaranteed
to be invoked with recent enough GHC (i.e. the stage1+ GHC).
After this commit, mostly the compiler and the testsuite remain using
`-f(wo-)warn...` because the compiler needs to be bootstrappable with
older GHCs, while for the testsuite it's convenient to be able to quickly
compare the behavior to older GHCs (which may not support the new flags yet).
The compiler-part can be updated to use the new flags once GHC 8.3 development
starts.
Reviewed By: quchen
Differential Revision: https://phabricator.haskell.org/D1637
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes use of the new facility introduced via
14d0f7f1221db758cd06a69f53803d9d0150164a which allows
to have certain flags passed only to the non-bootstrapping
GHC. This is needed because sometimes we can't assume the
existence of a certain flag in the bootstrapping compiler
which was only added recently to GHC HEAD.
This also updates the haddock submodule to fix a few
remaining noncanonical instance definitions.
Differential Revision: https://phabricator.haskell.org/D1571
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add stage specific versions of SRC_HC_OPTS. These are currently only
used for -Werror. The previous combination of GhcStage2HcOpts and
GhcLibHcOpts didn't apply to utils/*.
* Add stage specific versions of SRC_HC_WARNING_OPTS. These will later be
used for new warning supression flags that should not be passed to the
bootstrap compiler.
* Move -Wall (and -Werror) related code back to mk/warnings.mk, where it
was before 987d54274. Now all warning related code is nicely together.
Include mk/warnings.mk after mk/custom-settings.mk to make this work.
Reviewed By: bgamari, hvr
Differential Revision: https://phabricator.haskell.org/D1536
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: 'SRC_HC_OPTS += -Wall' in 'mk/warnings.mk' was getting
overwritten by 'SRC_HC_OPTS = ...' in 'mk/flavours/*.mk'.
It didn't affect the compiler or most other libraries, because most
.cabal files define 'ghc-options: -Wall'.
Bug introduced in commit
2c24fd707f8650205bb574ffac5f376239af3723, when moving validate settings
from 'mk/validate-settings.mk' to 'mk/flavours/validate.mk'.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D1425
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: using remote validate
Reviewers: austin, hvr, simonpj, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1117
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch suppresses them until they are fixed
libraries/parallel/Control/Parallel/Strategies.hs:513:2: warning:
Rule "parList/rseq" may never fire
because ‘rseq’ might inline first
Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘rseq’
libraries/parallel/Control/Parallel/Strategies.hs:582:1: warning:
Rule "evalBuffer/rseq" may never fire
because ‘rseq’ might inline first
Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘rseq’
libraries/parallel/Control/Parallel/Strategies.hs:583:1: warning:
Rule "parBuffer/rseq" may never fire
because ‘rseq’ might inline first
Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘rseq’
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GHC now warns if rules compete, so that it's not predicatable
which will work and which will not. E.g.
{-# RULES
f (g x) = ...
g True = ...
#-}
If we had (f (g True)) it's not clear which rule would fire.
This showed up fraility in the libraries.
* Suppress warnigns in Control.Arrow, Control.Category for class
methods. At the moment we simply don't have a good way to write a
RULE with a class method in the LHS. See Trac #1595. Arrow and
Category attempt to do so; I have silenced the complaints with
-fno-warn-inline-rule-shadowing, but it's not a great solution.
* Adjust the NOINLINE pragma on 'GHC.Base.map' to account for the
map/coerce rule
* Adjust the rewrite rules in Enum, especially for the "literal 1"
case. See Note [Enum Integer rules for literal 1].
* Suppress warnings for 'bytestring' e.g.
libraries/bytestring/Data/ByteString.hs:895:1: warning:
Rule "ByteString specialise break (x==)" may never fire
because rule "Class op ==" for ‘==’ might fire first
Probable fix: add phase [n] or [~n] to the competing rule
|
|
|
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate on 7.6
Reviewers: austin, goldfire
Subscribers: bgamari, thomie
Differential Revision: https://phabricator.haskell.org/D885
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This commit adds stage 1 support for Template Haskell
quoting, e.g. [| ... expr ... |], which is useful
for authors of quasiquoter libraries that do not actually
need splices. The TemplateHaskell extension now does not
unconditionally fail; it only fails if the renamer encounters
a splice that it can't run.
In order to make sure the referenced data structures
are consistent, template-haskell is now a boot library.
There are some minor BC changes to template-haskell to make it boot
on GHC 7.8.
Note for reviewer: big diff changes are simply code
being moved out of an ifdef; there was no other substantive
change to that code.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin, goldfire
Subscribers: bgamari, thomie
Differential Revision: https://phabricator.haskell.org/D876
GHC Trac Issues: #10382
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert "Quick fix: drop base bound on template-haskell."
This reverts commit 3c70ae032e4361b203dfcf22b0a424e8838a5037.
Revert "Always do polymorphic typed quote check, c.f. #10384"
This reverts commit 9a43b2c1f78b3cf684646af64b9b67dc8079f58f.
Revert "RnSplice's staging test should be applied for quotes in stage1."
This reverts commit eb0ed4030374af542c0a459480d32c8d4525e48d.
Revert "Split off quotes/ from th/ for tests that can be done on stage1 compiler."
This reverts commit 21c72e7d38c96ac80d31addf67ae4b3c7a6c3bbb.
Revert "Support stage 1 Template Haskell (non-quasi) quotes, fixes #10382."
This reverts commit 28257cae77023f2ccc4cc1c0cd1fbbd329947a00.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This commit adds stage 1 support for Template Haskell
quoting, e.g. [| ... expr ... |], which is useful
for authors of quasiquoter libraries that do not actually
need splices. The TemplateHaskell extension now does not
unconditionally fail; it only fails if the renamer encounters
a splice that it can't run.
In order to make sure the referenced data structures
are consistent, template-haskell is now a boot library.
In the following patches, there are:
- A few extra safety checks which should be enabled
in stage1
- Separation of the th/ testsuite into quotes/ which
can be run on stage1
Note for reviewer: big diff changes are simply code
being moved out of an ifdef; there was no other substantive
change to that code.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin, goldfire
Subscribers: bgamari, thomie
Differential Revision: https://phabricator.haskell.org/D876
GHC Trac Issues: #10382
|
|
The default validate settings currently disable some warnings in the
libraries. This patch moves those settings to a new file called
`mk/warnings.mk`, and applies them also to normal builds.
Through uncommenting a line in build.mk, developers can now build with
-Werror.
-Werror is not the default, because:
* We can not guarantee that the build is warning free on platforms we
don't run regularly run validate (as part of continuous integration
systems), and we still want the build to go through on those
platforms.
* quoting rwbarton on irc > "I think -Werror by default has come up in
the past and the argument was that it is too annoying when you are
doing nontrivial development"
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D785
|