summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Lexer: Alternate Layout Rule injects actual not virtual braceswip/T16279Alan Zimmerman2019-02-035-17/+62
| | | | | | | | | | | | | | | | | | | | | | | When the alternate layout rule is activated via a pragma, it injects tokens for { and } to make sure that the source is parsed properly. But it injects ITocurly and ITccurly, rather than their virtual counterparts ITvocurly and ITvccurly. This causes problems for ghc-exactprint, which tries to print these. Test case (the existing T13087.hs) {-# LANGUAGE AlternativeLayoutRule #-} {-# LANGUAGE LambdaCase #-} isOne :: Int -> Bool isOne = \case 1 -> True _ -> False main = return () Closes #16279
* Turn on -Wno-unused-imports in make build systemMatthew Pickering2019-02-021-0/+3
| | | | This mirrors Hadrian and it good enough to get us unstuck.
* Bump hsc2hs for removed unused matchSebastian Graf2019-02-021-0/+0
|
* Remove unused importsSebastian Graf2019-02-022-5/+1
|
* Turn on -Werror when validatingMatthew Pickering2019-02-021-1/+1
|
* Polished Note [Exceptions and strictness]Sebastian Graf2019-02-021-15/+27
| | | | [ci skip]
* Update user-settings.md with a pointer to `Packages`Sebastian Graf2019-02-021-1/+5
| | | [skip ci]
* Reject oversaturated VKAs in type family equationsRyan Scott2019-02-018-2/+108
|
* Remove ExnStr and ThrowsExn businessSebastian Graf2019-02-0111-240/+149
|
* Fix #16219: TemplateHaskell causes indefinite package build errorEdward Z. Yang2019-01-3111-0/+137
| | | | | | | | | | | | | | | | | | | | | | | | It should work to write an indefinite package using TemplateHaskell, so long as all of the actual TH code lives outside of the package. However, cleverness we had to build TH code even when building with -fno-code meant that we attempted to build object code for modules in an indefinite package, even when the signatures were not instantiated. This patch disables said logic in the event that an indefinite package is being typechecked. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: validate Reviewers: simonpj, bgamari Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #16219 Differential Revision: https://phabricator.haskell.org/D5475
* Revert "Performance tests: recover a baseline from ancestor commits and CI ↵Ben Gamari2019-01-317-353/+63
| | | | | | | | | results." Unfortunately this has broken all future commits due to spurious(?) performance changes which I have been unable to work around. This reverts commit cc2261d42f6a954d88e355aaad41f001f65c95da.
* Hadrian: Fix outdated link.Andrey Mokhov2019-01-311-1/+1
|
* Hadrian: Update instructions for building on WindowsAndrey Mokhov2019-01-312-24/+25
| | | | | | The `hadrian/doc/windows.md` file has falled out of date. In particular it still points to the old GitHub repository, and uses incorrect path to GHC. This patch fixes it.
* Update terminfo submoduleHerbert Valerio Riedel2019-01-311-0/+0
|
* Update stm submoduleHerbert Valerio Riedel2019-01-311-0/+0
|
* Update process submoduleHerbert Valerio Riedel2019-01-311-0/+0
|
* Update parsec submoduleHerbert Valerio Riedel2019-01-311-0/+0
|
* Update haskeline submoduleHerbert Valerio Riedel2019-01-311-0/+0
|
* Update deepseq submoduleHerbert Valerio Riedel2019-01-311-0/+0
|
* Update unix submoduleHerbert Valerio Riedel2019-01-312-0/+1
|
* Update text submoduleHerbert Valerio Riedel2019-01-311-0/+0
|
* Update hsc2hs submoduleHerbert Valerio Riedel2019-01-311-0/+0
|
* PPC NCG: Promote integers to word size in C callsPeter Trommler2019-01-312-15/+29
| | | | Fixes #16222
* Small optimizations to BlockLayout.klebinger.andreas@gmx.at2019-01-311-39/+31
| | | | | | | | | | * Remove `takeL/R 1` occurences by lastOL/headOL. * Make BlockChain a OrdList newtype by removing the set of blocks. Initially BlockChain contained both, a set for membership test and a ordered list of blocks. The set is not used for any performance sensitive lookups so we get rid of it.
* Replace BlockSequence with OrdList in BlockLayout.hsklebinger.andreas@gmx.at2019-01-312-77/+45
| | | | | OrdList does the same thing and more so there is no reason to have both.
* testsuite: Add test for #14828Ben Gamari2019-01-312-0/+19
|
* Introduce GhciMonad and generalize types of functions in GHCi.UIZejun Wu2019-01-312-234/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Introduce `GhciMonad`, which is bascially `GhcMonad` + `HasGhciState`. Generalize the commands and help functions defined in `GHCi.UI` so they can be used as both `GHCi a` and `InputT GHCi a`. The long term plan is to move reusable bits to ghci library and make it easier to build a customized interactive ui which carries customized state and provides customized commands. Most changes are trivial in this diff by relaxing the type constraint or add/remove lift as necessary. The non-trivial changes are: * Change `HasGhciState` to `GhciMonad` and expose it. * Implementation of `reifyGHCi`. Test Plan: ./validate Reviewers: simonmar, hvr, bgamari Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5433
* Add O2 to hsCompiler on stage0 for most hadrian flavours.klebinger.andreas@gmx.at2019-01-316-10/+10
|
* Use O2 on stage1 for faster overall build times with make.klebinger.andreas@gmx.at2019-01-319-9/+9
| | | | | | | | | | | | | | Build times when using the quick flavour: stage1 opt | time (wall) | time (user) -O1 | 13m | 53m -O2 | 13m | 51m So even when we compile stage2 with -O0 (quick) using -O2 on stage1 is already faster. The difference is even bigger when freezing stage1 and doing multiple builds or compiling stage2 with optimizations.
* Add -fdefer-diagnostics to defer and group diagnostic messages in make-modeZejun Wu2019-01-3110-2/+105
| | | | | | | | | | | | | When loading many modules in parallel there can a lot of warnings and errors get mixed up with regular output. When the compilation fails, the relevant error message can be thousands of lines backward and is hard to find. When the compilation successes, warning message is likely to be ignored as it is not seen. We can address this by deferring the warning and error message after the compilation. We also put errors after warnings so it is more visible. This idea was originally proposed by Bartosz Nitka in https://phabricator.haskell.org/D4219.
* hWaitForInput-accurate-stdin testBen Gamari2019-01-313-0/+53
|
* Optimize pprASCIISylvain Henry2019-01-311-12/+23
| | | | | | | | | * Use `ByteString.foldr` instead of `(List.foldr . BS.unpack)` * Avoid calling `chr` and its test that checks for invalid Unicode codepoints: we stay in the ASCII range so we know we're ok * Avoid calling `isPrint` (unsafe FFI call): we can check the ASCII printable range directly * Use bit operations (`unsafeShiftR`, `.&.`) instead of `div` and `mod`
* Use ByteString to represent Cmm string literals (#16198)Sylvain Henry2019-01-3132-97/+97
| | | | Also used ByteString in some other relevant places
* Fix syntax in CODEOWNERS fileMatthew Pickering2019-01-311-28/+28
| | | | [skip ci]
* Don't use X86_64_ELF_NONPIC_HACK for +RTS -xpZejun Wu2019-01-301-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When `+RTS -xp` is passed, when don't need the X86_64_ELF_NONPIC_HACK, becasue the relocation offset should only be out of range if * the object file was not compiled with `-fPIC -fexternal-dynamic-refs`; * ghc generates non-pic code while it should (e.g. #15723) In either case, we should print an error message rather that silently attempt to use a hacky workaround that may not work. This could have made debugging #15723 and #15729 much easier. Test Plan: Run this in a case where ghci used to crash becasue of T15723. Now we see helpful message like: ``` ghc-iserv-prof: R_X86_64_PC32 relocation out of range: stmzm2zi4zi4zi1zmJQn4hNPyYjP5m9AcbI88Ve_ControlziConcurrentziSTMziTMVar_readTMVar_C61n_cc = 9b95ffac ``` Reviewers: simonmar, bgamari, erikd Reviewed By: simonmar, bgamari Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5233
* Allocate bss section within proper range of other sectionsZejun Wu2019-01-3016-72/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This re-applies {D5195} and {D5235}, they were reverted as part of diff stack to unbreak i386. The proper fix is done in {D5289}. Allocate bss section within proper range of other sections: * when `+RTS -xp` is passed, allocate it contiguously as we did for jump islands * when we mmap the code to lower 2Gb, we should allocate bss section there too Test Plan: 1. `./validate` 2. with ``` DYNAMIC_GHC_PROGRAMS = NO DYNAMIC_BY_DEFAULT = NO ``` `TEST="T15729" make test` passed in both linux (both i386 and x86_64) and macos. 3. Also test in a use case where we used to encouter error like: ``` ghc-iserv-prof: R_X86_64_PC32 relocation out of range: (noname) = b90282ba ``` and now, everything works fine. Reviewers: simonmar, bgamari, angerman, erikd Reviewed By: simonmar Subscribers: rwbarton, carter GHC Trac Issues: #15729 Differential Revision: https://phabricator.haskell.org/D5290
* Add a RTS option -xp to load PIC object anywhere in address spaceZejun Wu2019-01-309-94/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This re-applies {D5195} with fixes for i386: * Fix unused label warnings, see {D5230} or {D5273} * Fix a silly bug introduced by moving `#if` {P190} Add a RTS option -xp to load PIC object anywhere in address space. We do this by relaxing the requirement of <0x80000000 result of `mmapForLinker` and implying USE_CONTIGUOUS_MMAP. We also need to change calls to `ocInit` and `ocGetNames` to avoid dangling pointers when the address of `oc->image` is changed by `ocAllocateSymbolExtra`. Test Plan: See {D5195}, also test under i386: ``` $ uname -a Linux watashi-arch32 4.18.5-arch1-1.0-ARCH #1 SMP PREEMPT Tue Aug 28 20:45:30 CEST 2018 i686 GNU/Linux $ cd testsuite/tests/th/ && make test ... ``` will run `./validate` on stacked diff. Reviewers: simonmar, bgamari, alpmestan, trommler, hvr, erikd Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5289
* API Annotations: Parens not attached correctly for ClassDeclAlan Zimmerman2019-01-306-37/+56
| | | | | | | | | | | The parens around the kinded tyvars should be attached to the class declaration as a whole, they are attached to the tyvar instead, outside the span. An annotation must always be within or after the span it is contained in. Closes #16212
* Only build vanilla way in devel2 flavourMatthew Pickering2019-01-301-1/+4
| | | | Fixes #16210
* Include type info for only some exprs in HIE filesAlec Theriault2019-01-302-8/+68
| | | | | | | | | | | | | | | | This commit relinquishes some some type information in `.hie` files in exchange for better performance. See #16233 for more on this. Using `.hie` files to generate hyperlinked sources is a crucial milestone towards Hi Haddock (the initiative to move Haddock to work over `.hi` files and embed docstrings in those). Unfortunately, even after much optimization on the Haddock side, the `.hie` based solution is still considerably slower and more memory hungry than the existing implementation - and the @.hie@ code is to blame. This changes `.hie` file generation to track type information for only a limited subset of expressions (specifically, those that might eventually turn into hyperlinks in the Haddock's hyperlinker backend).
* Use `NameEnv Id` instead of `Map Name Id`Alec Theriault2019-01-301-5/+8
| | | | This is more consistent with the rest of the GHC codebase.
* make ghc-pkg shut upMoritz Angermann2019-01-301-1/+1
|
* Avoid compiling Hadrian dependencies with profiling on Cabal/LinuxNeil Mitchell2019-01-301-1/+1
|
* Avoid compiling Hadrian dependencies with profiling on Cabal/WindowsNeil Mitchell2019-01-301-1/+1
|
* gitlab-ci: Use build cleanup logic on Darwin as wellBen Gamari2019-01-301-3/+21
| | | | | We use the shell executor on Darwin as well as Windows. See https://gitlab.com/gitlab-org/gitlab-runner/issues/3856.
* Compile count{Leading,Trailing}Zeros to corresponding x86_64 instructions ↵Dmitry Ivanov2019-01-307-28/+107
| | | | | | | under -mbmi2 This works similarly to existing implementation for popCount. Trac ticket: #16086.
* Performance tests: recover a baseline from ancestor commits and CI results.David Eichmann2019-01-307-63/+353
| | | | gitlab-ci: push performance metrics as git notes to the "GHC Performance Notes" repository.
* testsuite: Use makefile_testBen Gamari2019-01-30154-790/+617
| | | | | This eliminates most uses of run_command in the testsuite in favor of the more structured makefile_test.
* testsuite: Introduce makefile_testBen Gamari2019-01-302-1/+8
|
* Revert "Batch merge"Ben Gamari2019-01-30198-1521/+1097
| | | | This reverts commit 76c8fd674435a652c75a96c85abbf26f1f221876.