summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* WIP: tracing ghc hadrianwip/hadrian-eventlogMatthew Pickering2019-05-294-3/+10
| | | | See #16710
* Provide details in `plusSimplCount` errorsJosh Meredith2019-05-291-1/+8
|
* tcMatchesFun s/rho/sigma #16692Vladislav Zavialov2019-05-292-3/+3
|
* CNF.c: Move debug functions behind ifdefÖmer Sinan Ağacan2019-05-291-1/+1
|
* downsweep: Allow TargetFile not to exist when a buffer is givenDaniel Gröber2019-05-294-18/+14
| | | | | | | | | | Currently 'getRootSummary' will fail with an exception if a 'TargetFile' is given but it does not exist even if an input buffer is passed along for this target. In this case it is not necessary for the file to exist since the buffer will be used as input for the compilation pipeline instead of the file anyways.
* Allow using tagetContents for modules needing preprocessingDaniel Gröber2019-05-296-38/+242
| | | | | | | | | | | | | | | | | | This allows GHC API clients, most notably tooling such as Haskell-IDE-Engine, to pass unsaved files to GHC more easily. Currently when targetContents is used but the module requires preprocessing 'preprocessFile' simply throws an error because the pipeline does not support passing a buffer. This change extends `runPipeline` to allow passing the input buffer into the pipeline. Before proceeding with the actual pipeline loop the input buffer is immediately written out to a new tempfile. I briefly considered refactoring the pipeline at large to pass around in-memory buffers instead of files, but this seems needlessly complicated since no pipeline stages other than Hsc could really support this at the moment.
* Add hPutStringBuffer utilityDaniel Gröber2019-05-291-0/+6
|
* Don't lose parentheses in show SomeAsyncExceptionNathan Collins2019-05-291-1/+1
|
* Fix missing unboxed tuple RuntimeReps (#16565)Krzysztof Gogolewski2019-05-294-34/+47
| | | | | | | | | | | | | Unboxed tuples and sums take extra RuntimeRep arguments, which must be manually passed in a few places. This was not done in deSugar/Check. This error was hidden because zipping functions in TyCoRep ignored lists with mismatching length. This is now fixed; the lengths are now checked by calling zipEqual. As suggested in #16565, I moved checking for isTyVar and isCoVar to zipTyEnv and zipCoEnv.
* In hole fits, don't show VTA for inferred variables (#16456)Krzysztof Gogolewski2019-05-296-13/+41
| | | | | We fetch the ArgFlag for every argument by using splitForAllVarBndrs instead of splitForAllTys in unwrapTypeVars.
* Add test for old issue displaying unboxed tuples in error messages (#502)Kevin Buhr2019-05-293-0/+23
|
* Fix some warnings in users_guide (incl #16640)Oleg Grenrus2019-05-293-3/+11
| | | | | | | | | | | | | | - short underline - :ghc-flag:, not :ghc-flags: - :since: have to be separate - newline before code block - workaround anchor generation so - pragma:SPECIALISE - pragma:SPECIALIZE-INLINE - pragma:SPECIALIZE-inline are different anchors, not all the same `pragma:SPECIALIZE`
* Remove stale 8.2.1-notesOleg Grenrus2019-05-291-527/+0
|
* Minor spelling fixes to users guide.P.C. Shyamshankar2019-05-298-8/+8
|
* testsuite: introduce 'static_stats' testsAlp Mestanogullari2019-05-2910-22/+62
| | | | | | | | | | | | | | | | They are a particular type of perf tests. This patch introduces a 'stats_files_dir' configuration field in the testsuite driver where all haddock timing files (and possibly others in the future) are assumed to live. We also change both the Make and Hadrian build systems to pass respectively $(TOP)/testsuite/tests/perf/haddock/ and <build root>/stage1/haddock-timing-files/ as the value of that new configuration field, and to generate the timing files in those directories in the first place while generating documentation with haddock. This new test type can be seen as one dedicated to examining stats files that are generated while building a GHC distribution. This also lets us get rid of the 'extra_files' directives in the all.T entries for haddock.base, haddock.Cabal and haddock.compiler.
* Handle hs-boot files in -Wmissing-home-modules (#16551)Krzysztof Gogolewski2019-05-296-0/+13
|
* Improve comments around injectivity checksRichard Eisenberg2019-05-283-21/+23
|
* Add missing opening braces in Cmm dumpsÖmer Sinan Ağacan2019-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously -ddump-cmm was generating code with unbalanced curly braces: stg_atomically_entry() // [R1] { info_tbls: [(cfl, label: stg_atomically_info rep: tag:16 HeapRep 1 ptrs { Thunk } srt: Nothing)] stack_info: arg_space: 8 updfr_space: Just 8 } {offset cfl: // cfk unwind Sp = Just Sp + 0; _cfk::P64 = R1; //tick src<rts/PrimOps.cmm:(1243,1)-(1245,1)> R1 = I64[_cfk::P64 + 8 + 8 + 0 * 8]; call stg_atomicallyzh(R1) args: 8, res: 0, upd: 8; } }, <---- OPENING BRACE MISSING After this patch: stg_atomically_entry() { // [R1] <---- MISSING OPENING BRACE HERE { info_tbls: [(cfl, label: stg_atomically_info rep: tag:16 HeapRep 1 ptrs { Thunk } srt: Nothing)] stack_info: arg_space: 8 updfr_space: Just 8 } {offset cfl: // cfk unwind Sp = Just Sp + 0; _cfk::P64 = R1; //tick src<rts/PrimOps.cmm:(1243,1)-(1245,1)> R1 = I64[_cfk::P64 + 8 + 8 + 0 * 8]; call stg_atomicallyzh(R1) args: 8, res: 0, upd: 8; } },
* hadrian: Fix generation of settingsJohn Ericson2019-05-271-2/+2
| | | | | | | | I jumbled some lines in e529c65eacf595006dd5358491d28c202d673732, messing up the leading underscores and rts ways settings. This broke at least stage1 linking on macOS, but probably loads of other things too. Should fix #16685 and #16658.
* Fix padding of entries in .prof filesJasper Van der Jeugt2019-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | When the number of entries of a cost centre reaches 11 digits, it takes up the whole space reserved for it and the prof file ends up looking like: ... no. entries %time %alloc %time %alloc ... ... 120918 978250 0.0 0.0 0.0 0.0 ... 118891 0 0.0 0.0 73.3 80.8 ... 11890229702412351 8.9 13.5 73.3 80.8 ... 118903 153799689 0.0 0.1 0.0 0.1 ... This results in tooling not being able to parse the .prof file. I realise we have the JSON output as well now, but still it'd be good to fix this little weirdness. Original bug report and full prof file can be seen here: <https://github.com/jaspervdj/profiteur/issues/28>.
* base: Include (<$) in all exports of FunctorSimon Jakobi2019-05-272-3/+2
| | | | | | | Previously the haddocks for Control.Monad and Data.Functor gave the impression that `fmap` was the only Functor method. Fixes #16681.
* Add a pprTraceWith functionSebastian Graf2019-05-271-3/+9
|
* Fix tcfail158 (#15899)Krzysztof Gogolewski2019-05-272-4/+5
| | | | | As described in #15899, this test was broken, but now it's back to normal.
* Correct the large tuples section in user's guideJoshua Price2019-05-271-8/+8
| | | | Fixes #16644.
* Fix typo of primop formatmizunashi_mana2019-05-271-1/+1
|
* Hadrian: Fix problem with unlit path in settings fileAlp Mestanogullari2019-05-271-1/+3
| | | | | | | | | | | | | | | e529c65e introduced a problem in the logic for generating the path to the unlit command in the settings file, and this patches fixes it. This fixes many tests, the simplest of which is: > _build/stage1/bin/ghc testsuite/tests/parser/should_fail/T8430.lhs which failed because of a wrong path for unlit, and now fails for the right reason, with the error message expected for this test. This addresses #16659.
* Lowercase windows importsMoritz Angermann2019-05-272-4/+4
| | | | | | | | | | While windows and macOS are currently on case-insensitive file systems, this poses no issue on those. When cross compiling from linux with a case sensitive file system and mingw providing only lowercase headers, this in fact produces an issue. As such we just lowercase the import headers, which should still work fine on a case insensitive file system and also enable mingw's headers to be usable porperly.
* Let the specialiser work on dicts under lambdasSandy Maguire2019-05-267-121/+629
| | | | | | | | | | | | | | | | | | | | | Following the discussion under #16473, this change allows the specializer to work on any dicts in a lambda, not just those that occur at the beginning. For example, if you use data types which contain dictionaries and higher-rank functions then once these are erased by the optimiser you end up with functions such as: ``` go_s4K9 Int# -> forall (m :: * -> *). Monad m => (forall x. Union '[State (Sum Int)] x -> m x) -> m () ``` The dictionary argument is after the Int# value argument, this patch allows `go` to be specialised.
* Hadrian: Add Mising Libffi Dependencies #16653David Eichmann2019-05-251-5/+23
| | | | | | | | Libffi is ultimately built from a single archive file (e.g. libffi-tarballs/libffi-3.99999+git20171002+77e130c.tar.gz). The file can be seen as the shallow dependency for the whole libffi build. Hence, in all libffi rules, the archive is `need`ed and the build directory is `trackAllow`ed.
* Add `keepCAFs` to RtsSymbolsMoritz Angermann2019-05-251-0/+1
|
* Add PlainPanic for throwing exceptions without depending on pprintMichael Sloan2019-05-2411-96/+178
| | | | | | | | | | | | | | | | | | | | | This commit splits out a subset of GhcException which do not depend on pretty printing (SDoc), as a new datatype called PlainGhcException. These exceptions can be caught as GhcException, because 'fromException' will convert them. The motivation for this change is that that the Panic module transitively depends on many modules, primarily due to pretty printing code. It's on the order of about 130 modules. This large set of dependencies has a few implications: 1. To avoid cycles / use of boot files, these dependencies cannot throw GhcException. 2. There are some utility modules that use UnboxedTuples and also use `panic`. This means that when loading GHC into GHCi, about 130 additional modules would need to be compiled instead of interpreted. Splitting the non-pprint exception throwing into a new module resolves this issue. See #13101
* Allow metric change after reverting "Add Generic tuple instances up to ↵David Eichmann2019-05-240-0/+0
| | | | | | | | | | | 15-tuple" #16688 Metrics increased on commit 5eb9445444c4099fc9ee0803ba45db390900a80f and decreased on revert commit 535a26c90f458801aeb1e941a3f541200d171e8f. Metric Decrease: T9630 haddock.base
* Some forall-related cleanup in deriving codeRyan Scott2019-05-237-5/+40
| | | | | | | | * Tweak the parser to allow `deriving` clauses to mention explicit `forall`s or kind signatures without gratuitous parentheses. (This fixes #14332 as a consequence.) * Allow Haddock comments on `deriving` clauses with explicit `forall`s. This requires corresponding changes in Haddock.
* Add a `NOINLINE` pragma on `someNatVal` (#16586)Iavor Diatchki2019-05-235-0/+91
| | | | This fixes #16586, see `Note [NOINLINE someNatVal]` for details.
* Add a test for #16597Ömer Sinan Ağacan2019-05-233-0/+11
|
* add an --hadrian mode to ./validateAlp Mestanogullari2019-05-235-210/+309
| | | | | | | | | | | | | | When the '--hadrian' flag is passed to the validate script, we use hadrian to build GHC, package it up in a binary distribution and later on run GHC's testsuite against the said bindist, which gets installed locally in the process. Along the way, this commit fixes a typo, an omission (build iserv binaries before producing the bindist archive) and moves the Makefile that enables 'make install' on those bindists from being a list of strings in the code to an actual file (it was becoming increasingly annoying to work with). Finally, the Settings.Builders.Ghc part of this patch is necessary for being able to use the installed binary distribution, in 'validate'.
* Revert "Add Generic tuple instances up to 15-tuple" #16688David Eichmann2019-05-231-48/+0
| | | | | | This reverts commit 5eb9445444c4099fc9ee0803ba45db390900a80f. It has caused an increase in variance of performance test T9630, causing CI to fail.
* fix Template Haskell cross compilation on 64 bit compiler with 32 bit targetLuite Stegeman2019-05-225-13/+18
|
* Use HsTyPats in associated type family defaultsRyan Scott2019-05-2232-325/+474
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Associated type family default declarations behave strangely in a couple of ways: 1. If one tries to bind the type variables with an explicit `forall`, the `forall`'d part will simply be ignored. (#16110) 2. One cannot use visible kind application syntax on the left-hand sides of associated default equations, unlike every other form of type family equation. (#16356) Both of these issues have a common solution. Instead of using `LHsQTyVars` to represent the left-hand side arguments of an associated default equation, we instead use `HsTyPats`, which is what other forms of type family equations use. In particular, here are some highlights of this patch: * `FamEqn` is no longer parameterized by a `pats` type variable, as the `feqn_pats` field is now always `HsTyPats`. * The new design for `FamEqn` in chronicled in `Note [Type family instance declarations in HsSyn]`. * `TyFamDefltEqn` now becomes the same thing as `TyFamInstEqn`. This means that many of `TyFamDefltEqn`'s code paths can now reuse the code paths for `TyFamInstEqn`, resulting in substantial simplifications to various parts of the code dealing with associated type family defaults. Fixes #16110 and #16356.
* Hadrian: add --test-root-dirs, to only run specific directories of testsAlp Mestanogullari2019-05-223-4/+49
| | | | | | | | | We can specify several of those, by using the flag multiple times or just once but combining the directories with ':'. Along the way, this patch also fixes the testsuite-related --only flag, so that we can use it many times instead of being force to specify a space-separated list of test in a single --only flag.
* RTS: Fix restrictive castAlec Theriault2019-05-221-2/+2
| | | | | | | | | | | | | Commit e75a9afd2989e0460f9b49fa07c1667299d93ee9 added an `unsigned` cast to account for OSes that have signed `rlim_t` signed. Unfortunately, the `unsigned` cast has the unintended effect of narrowing `rlim_t` to only 4 bytes. This leads to some spurious out of memory crashes (in particular: Haddock crashes with OOM whenn building docs of `ghc`-the-library). In this case, `W_` is a better type to cast to: we know it will be unsigned too and it has the same type as `*len` (so we don't suffer from accidental narrowing).
* Add regression test for old Word32 arithmetic issue (#497)Kevin Buhr2019-05-223-0/+15
|
* Use datatype for unboxed returns when loading ghc into ghciMichael Sloan2019-05-223-58/+110
| | | | See #13101 and #15454
* Have GHCi use object code for UnboxedTuples modules #15454Michael Sloan2019-05-229-21/+71
| | | | | | | | | | | | The idea is to automatically enable -fobject-code for modules that use UnboxedTuples, along with all the modules they depend on. When looking into how to solve this, I was pleased to find that there was already highly similar logic for enabling code generation when -fno-code is specified but TemplateHaskell is used. The state before this patch was that if you used unboxed tuples then you had to enable `-fobject-code` globally rather than on a per module basis.
* Allow for multiple linker instances. Fixes Haskell portion of #3372.Julian Leviston2019-05-2112-151/+284
|
* Update .gitlab-ci.ymlBen Gamari2019-05-211-1/+1
|
* gitlab-ci: Allow Windows Hadrian build to failBen Gamari2019-05-211-1/+3
| | | Due to #16574.
* Fix #16666 by parenthesizing contexts in ConvertRyan Scott2019-05-214-11/+30
| | | | | | | | | | Most places where we convert contexts in `Convert` are actually in positions that are to the left of some `=>`, such as in superclasses and instance contexts. Accordingly, these contexts need to be parenthesized at `funPrec`. To accomplish this, this patch changes `cvtContext` to require a precedence argument for the purposes of calling `parenthesizeHsContext` and adjusts all `cvtContext` call sites accordingly.
* distrib/configure.ac.in: remove mention to 'settings', since settings.in is goneAlp Mestanogullari2019-05-211-1/+1
| | | | | | | | Otherwise, when `./configure`ing a GHC bindist, produced by either Make or Hadrian, we would try to generate the `settings` file from the `settings.in` template that we used to have around but which has been gone since d37d91e9. That commit generates the settings file using the build systems instead, but forgot to remove this mention to the `settings` file.
* Update resolver for for happy 1.19.10Shayne Fletcher2019-05-211-1/+1
|