summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Print which warning-flag controls an emitted warning.wip/warning-originsMichael Walker2016-02-2544-184/+387
| | | | | | | | | | | | | | | | | | | | | | | | | | Both gcc and clang tell which warning flag a reported warning can be controlled with, this patch makes ghc do the same. More generally, this allows for annotated compiler output, where an optional annotation is displayed in brackets after the severity. Display which group enables a warning. Add flag to show which group a warning belongs to ``-f(no-)show-warning-groups``, used to show/hide the group an emitted warning belongs to. On by default. Fix compilation error in ghc-api test Reviewers: goldfire, hvr, quchen, austin, bgamari Reviewed By: quchen, bgamari Subscribers: goldfire, thomie Differential Revision: https://phabricator.haskell.org/D1943 GHC Trac Issues: #10752
* Improve accuracy of suggestion to use TypeApplicationsMatthew Pickering2016-02-254-13/+9
| | | | | | | | | | | | | | | | The suggestion only makes sense when we try to use an as pattern in an expression context. It is misleading in the case of a lazy pattern and view pattern. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1948
* Handle multiline named haddock comments properlyThomas Miedema2016-02-255-16/+58
| | | | | | | | | | | | | Fixes #10398 in a different way, thereby also fixing #11579. I inverted the logic of the Bool argument to "worker", to hopefully make it more self-explanatory. Reviewers: austin, hvr, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1935
* (Alternative way to) address #8710George Karachalias2016-02-2520-99/+122
| | | | | | | | | | | | | | | | | | | | | | | | Issue a separate warning per redundant (or inaccessible) clause. This way each warning can have more precice location information (the location of the clause under consideration and not the whole match). I thought that this could be too much but actually the number of such warnings is bound by the number of cases matched against (in contrast to the non-exhaustive warnings which may be exponentially more). Test Plan: validate Reviewers: simonpj, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1920 GHC Trac Issues: #8710
* cmpTypeX: Avoid kind comparison when possibleBen Gamari2016-02-251-25/+60
| | | | | | | | | | | | | | | | | | This comparison is only necessary when the types being compared contain casts. Otherwise the structural equality of the types implies that their kinds are equal. Test Plan: Validate Reviewers: goldfire, austin, simonpj Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1944 GHC Trac Issues: #11597
* Bump haddock.base allocationsBen Gamari2016-02-251-1/+2
| | | | I believe this is probably due to the recent RuntimeRep change.
* Reconstruct record expression in bidir pattern synonymMatthew Pickering2016-02-254-8/+39
| | | | | | | | | | Reviewers: austin, rdragon, bgamari Reviewed By: bgamari Subscribers: rdragon, thomie Differential Revision: https://phabricator.haskell.org/D1949
* Make warning names more consistentManav Rathi2016-02-2514-51/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace "Sigs" with "Signatures" in WarningFlag data constructors. - Replace "PatSyn" with "PatternSynonym" in WarningFlag data constructors. - Deprecate "missing-local-sigs" in favor of "missing-local-signatures". - Deprecate "missing-exported-sigs" in favor of "missing-exported-signatures". - Deprecate "missing-pat-syn-signatures" in favor of "missing-pattern-synonym-signatures". - Replace "ddump-strsigs" with "ddump-str-signatures" These complete the tasks that were explicitly mentioned in #11583 Test Plan: Executed `ghc --show-options` and verified that the flags were changed as expected. Reviewers: svenpanne, austin, bgamari Reviewed By: austin, bgamari Subscribers: mpickering, thomie Differential Revision: https://phabricator.haskell.org/D1939 GHC Trac Issues: #11583
* Add more type class instances for GHC.GenericsRyanGlScott2016-02-2512-34/+505
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GHC.Generics provides several representation data types that have obvious instances of various type classes in base, along with various other types of meta-data (such as associativity and fixity). Specifically, instances have been added for the following type classes (where possible): - Applicative - Data - Functor - Monad - MonadFix - MonadPlus - MonadZip - Foldable - Traversable - Enum - Bounded - Ix - Generic1 Thanks to ocharles for starting this! Test Plan: Validate Reviewers: ekmett, austin, hvr, bgamari Reviewed By: bgamari Subscribers: RyanGlScott, thomie Differential Revision: https://phabricator.haskell.org/D1937 GHC Trac Issues: #9043
* HscMain: Delete some unused codeÖmer Sinan Ağacan2016-02-251-68/+0
| | | | | | | | | | Reviewers: bgamari, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1936
* ApplicativeDo: Handle terminal `pure` statementsBen Gamari2016-02-255-2/+15
| | | | | | | | | | | | | | | | | ApplicativeDo handled terminal `return` statements properly, but not `pure`. Test Plan: Validate with included testcase Reviewers: austin, simonmar Reviewed By: austin, simonmar Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1931 GHC Trac Issues: #11607
* base: A selection of fixes to the comments in GHC.StatsDavid Turner2016-02-251-17/+31
| | | | | | | | | | | | | | | | | Use `-- |` comments throughout. Note that numByteUsageSamples is also the number of major GCs Note that numGcs counts GCs for all generations Note that 'current' really means 'at the end of the last major GC' Reviewers: ezyang, hvr, simonmar, austin, bgamari Reviewed By: ezyang, simonmar, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1929 GHC Trac Issues: #11603
* testsuite: mark tests broken on powerpc64Peter Trommler2016-02-2514-15/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following tests fail on powerpc64 and have a ticket. Mark those tests as expect_broken. Here are the details: The PowerPC native code generator does not support DWARF debug information. This is tracked in ticket #11261. Mark the respective tests broken on powerpc64. testsuite: mark print022 broken on powerpc64 Ticket #11262 tracks difference in stdout for print022. testsuite: mark recomp015 broken on powerpc64 testsuite: mark recomp011 broken on powerpc64 This is tracked as ticket #11323 and #11260. testsuite: mark linker tests broken on powerpc64 Ticket #11259 tracks tests failing because there is no RTS linker on powerpc64. Test Plan: validate Reviewers: erikd, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1928 GHC Trac Issues: #11259, #11260, #11261, #11262, #11323
* Overload the static form to reduce verbosity.Facundo Domínguez2016-02-254-8/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Static pointers are rarely used naked: most often they are defined at the base of a Closure, as defined in e.g. the distributed-closure and distributed-static packages. So a typical usage pattern is: distributeMap (closure (static (\x -> x * 2))) which is more verbose than it needs to be. Ideally we'd just have to write distributeMap (static (\x -> x * 2)) and let the static pointer be lifted to a Closure implicitly. i.e. what we want is to overload static literals, just like we already overload list literals and string literals. This is achieved by introducing the IsStatic type class and changing the typing rule for static forms slightly: static (e :: t) :: IsStatic p => p t Test Plan: ./validate Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: simonpj, mboes, thomie Differential Revision: https://phabricator.haskell.org/D1923 GHC Trac Issues: #11585
* TyCoRep: Add haddock sectionsBen Gamari2016-02-251-5/+5
|
* Remove "use mask" from StgAlt syntaxÖmer Sinan Ağacan2016-02-248-42/+25
| | | | | | | | | | Reviewers: austin, bgamari, simonpj Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1933
* Address #11471 by putting RuntimeRep in kinds.wip/runtime-repRichard Eisenberg2016-02-24102-1221/+1755
| | | | | | | | | | | | | | | | | | | | | See Note [TYPE] in TysPrim. There are still some outstanding pieces in #11471 though, so this doesn't actually nail the bug. This commit also contains a few performance improvements: * Short-cut equality checking of nullary type syns * Compare types before kinds in eqType * INLINE coreViewOneStarKind * Store tycon binders separately from kinds. This resulted in a ~10% performance improvement in compiling the Cabal package. No change in functionality other than performance. (This affects the interface file format, though.) This commit updates the haddock submodule.
* Follow-up to 32a9a7f514bdd33ff72a673adeHerbert Valerio Riedel2016-02-231-2/+2
| | | | ...forgot to stage/add this alpha renaming to the previous commit
* Extend `-Wunrecognised-warning-flag` to cover `-f(no-)warn-*`Herbert Valerio Riedel2016-02-231-5/+7
| | | | | | | | | | | The original implementation for #11429 covers only `-W*` flags. However, old packages will continue to use `-f(no-)warn-*` flags, so it seems desirable to have `-Wunrecognised-warning-flag` apply to those legacy aliases as well. Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1942
* Testsuite: MAKEFLAGS is magic, do not unexport itThomas Miedema2016-02-232-2/+70
| | | | | | Call `+$(PYTHON) ...` to fix #11569 instead. See Note [Communicating options and variables to a submake].
* Allow combining characters in identifiers (#7650)Thomas Miedema2016-02-235-8/+22
| | | | | | Reviewed by: austin, rwbarton Differential Revision: https://phabricator.haskell.org/D1938
* Testsuite: failing profiling tests (#10037)Thomas Miedema2016-02-231-5/+8
| | | | These tests fail not only for WAY=prof, but also for WAY=profllvm.
* Filter out -prof callstacks from test output (#11521)Thomas Miedema2016-02-233-3/+20
|
* Testsuite: cleanup profiling/should_run/all.T (#11521)Thomas Miedema2016-02-232-100/+44
| | | | | Refactoring only. I compared before and after with 'make slow', and it still runs each test with the same 'ways' as before.
* Testsuite: delete Windows line endings [skip ci] (#11631)Thomas Miedema2016-02-2390-546/+535
|
* Testsuite: delete Windows line endings [skip ci] (#11631)Thomas Miedema2016-02-2372-400/+400
|
* Testsuite: accept output without Windows line endings (#11631)Thomas Miedema2016-02-2368-590/+613
|
* Testsuite: accept output without Windows line endings (#11631)Thomas Miedema2016-02-2350-480/+483
|
* Testsuite: delete Windows line endings [skip ci] (#11631)Thomas Miedema2016-02-2333-674/+674
|
* Testsuite: delete Windows line endings [skip ci] (#11631)Thomas Miedema2016-02-2334-924/+924
|
* Testsuite: delete Windows line endings [skip ci] (#11631)Thomas Miedema2016-02-2361-962/+962
|
* Testsuite: delete Windows line endings [skip ci] (#11631)Thomas Miedema2016-02-2359-1034/+1034
|
* Testsuite: delete Windows line endings [skip ci] (#11631)Thomas Miedema2016-02-2312-1021/+1021
|
* Add missing filesSimon Marlow2016-02-232-0/+44
|
* Docs: -keep-llvm-file(s)/-ddump-llvm imply -fllvmThomas Miedema2016-02-224-5/+14
| | | | This fixes #9917.
* Fix GHC.Stats documentation markup (#11619)Thomas Miedema2016-02-211-0/+5
|
* Build system: fix sed expression (#11537)Thomas Miedema2016-02-211-1/+1
| | | | This allows building ghc in '/ghc'.
* Testsuite: pass '-s --no-print-directory' to MAKEThomas Miedema2016-02-2123-49/+49
| | | | This seems necessary after 9634e24 (#11569).
* Add test for #6132: hash bang + CPPThomas Miedema2016-02-202-0/+17
|
* unexport MAKEFLAGS when running tests (#11569)Thomas Miedema2016-02-201-0/+2
|
* Add test (only) to assure that #11535 is fixedTakayuki Muranushi2016-02-203-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Ticket #11535 dealt with derived Read instances of infix Unicode value constructors. GHC 7.10.3 used to derive (Read/Show) instances so that `read . show` for values of such types had no parse. The issue has been fixed by other compiler update. This patch adds only tests, so that derived instance of Read/Show for infix Unicode value constructors has correct parse, satisfying Haskell 2010 Specification. Resolves: #11535 Test Plan: `make test TEST=T11535` Reviewers: austin, rwbarton, thomie, bgamari Reviewed By: rwbarton, thomie, bgamari Subscribers: rwbarton, thomie Projects: #ghc Differential Revision: https://phabricator.haskell.org/D1884 GHC Trac Issues: #11535
* Use a better test for profilingSimon Marlow2016-02-203-3/+3
| | | | | | | | The previous test failed for me because I had GhcRTSWays += thr_debug_p in my validate.mk, which doesn't enable profiling by itself.
* Fix a double-free bug in -fexternal-interpreterSimon Marlow2016-02-201-1/+0
| | | | | | | Originally I planned to make this reference manually managed, but it looks like at some point I gave it a finalizer on the GHC side, but forgot to remove the manual free here. The result is that ghc-iserv could crash in getStablePtr sometimes when using TH.
* Fix a bug in ApplicativeDo (#11612)Simon Marlow2016-02-203-6/+34
| | | | | In some cases ApplicativeDo would miss some opportunities, due to a wrong calculation of free variables in RnExpr.segments.
* Refactoring only: use ExprLStmtSimon Marlow2016-02-201-19/+19
|
* Docs: no space in `-i⟨dir1⟩:⟨dir2⟩` [skip ci]Thomas Miedema2016-02-191-1/+1
|
* Pass -haddock to tests in should_compile_*flag*_nohaddockThomas Miedema2016-02-195-4/+48
| | | | | | | | | should_compile_flag_nohaddock and should_compile_noflag_nohaddock contain the exact same tests. By passing `-haddock` to the tests in should_compile_**flag**_nohaddock, at least they're now testing different things. Add documentation.
* Modifier letter in middle of identifier is okThomas Miedema2016-02-196-25/+12
| | | | | | | | | | | | Refactoring only. Cleanup some loose ends from #10196. Initially the idea was to only allow modifier letters at the end of identifiers. Since we later decided to allow modifier letters also in the middle of identifiers (because not doing so would not fix the regression completely), the names `suffix` and `okIdSuffixChar` don't seem appropriate anymore. Remove TODO. Move test from should_fail to should_compile.
* Delete support for deprecated "-- # ..."-style haddock optionsThomas Miedema2016-02-193-17/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | A long time ago, you could use `"-- # <haddock options>"` to mean that `<haddock options.` should be passed to `haddock`. Since 2007 (03d8585e0940e28e024548654fe3505685aca94f), using `OPTIONS_HADDOCK` is the preferred way to do this. Why is ok to remove support for "-- # .."? * It is not mentioned in the Haddock user's guide, nor are there any tests that use it. * Ever since 2011 (b3e30449aa6d6eaa978eb3c7447ca85985d9d251), it doesn't actually work anymore. The function `getOptionsFromFile` uses `gopt_unset dflags Opt_Haddock` for other reasons, so even when running ghc with `--haddock`, the following rule always fires when the lexer sees "-- # ..", and it gets treated as a normal comment: ``` -- Next, match Haddock comments if no -haddock flag "-- " [$docsym \#] .* / { ifExtension (not . haddockEnabled) } { lineCommentToken } ``` Reviewed by: bgamari Differential Revision: https://phabricator.haskell.org/D1932
* A few more typos in non-codeGabor Greif2016-02-193-3/+3
|