- 18 Jun, 2019 1 commit
-
-
Ben Gamari authored
Fixes #16689.
-
- 04 Jun, 2019 1 commit
-
-
xldenis authored
This commit adds the `:instances` command to ghci following proosal number 41. This makes it possible to query which instances are available to a given type. The output of this command is all the possible instances with type variables and constraints instantiated.
-
- 31 May, 2019 1 commit
-
-
wz1000 authored
Implements #16686 The files version is automatically generated from the current GHC version in the same manner as normal interface files. This means that clients can first read the version and then decide how to read the rest of the file.
-
- 22 May, 2019 1 commit
-
-
Julian Leviston authored
-
- 12 Apr, 2019 1 commit
-
-
Andreas Klebinger authored
Intermediate STG does not contain free variables which can be useful sometimes. So adding a flag to dump that info.
-
- 06 Mar, 2019 1 commit
-
-
Ben Gamari authored
The splitter is an evil Perl script that processes assembler code. Its job can be done better by the linker's --gc-sections flag. GHC passes this flag to the linker whenever -split-sections is passed on the command line. This is based on @DemiMarie's D2768. Fixes Trac #11315 Fixes Trac #9832 Fixes Trac #8964 Fixes Trac #8685 Fixes Trac #8629
-
- 18 Feb, 2019 1 commit
-
-
Vladislav Zavialov authored
-
- 16 Feb, 2019 1 commit
-
-
Matthew Pickering authored
-
- 13 Jan, 2019 1 commit
-
-
Ömer Sinan Ağacan authored
Instead of parsing and executing a statement or declaration directly we now parse them first and then execute in a separate step. This gives us the flexibility to inspect the parsed declaration before execution. Using this we now inspect parsed declarations, and if it's a single declaration of form `x = y` we execute it as `let x = y` instead, fixing a ton of problems caused by poor declaration support in GHCi. To avoid any users of the modules I left `execStmt` and `runDecls` unchanged and added `execStmt'` and `runDecls'` which work on parsed statements/declarations.
-
- 05 Jan, 2019 1 commit
-
-
Ömer Sinan Ağacan authored
Fixes #16131
-
- 11 Dec, 2018 1 commit
-
-
Alec Theriault authored
Adds a `-fenable-ide-info` flag which instructs GHC to generate `.hie` files (see the wiki page: https://ghc.haskell.org/trac/ghc/wiki/HIEFiles). This is a rebased version of Zubin Duggal's (@wz1000) GHC changes for his GSOC project, as posted here: https://gist.github.com/wz1000/5ed4ddd0d3e96d6bc75e095cef95363d. Test Plan: ./validate Reviewers: bgamari, gershomb, nomeata, alanz, sjakobi Reviewed By: alanz, sjakobi Subscribers: alanz, hvr, sjakobi, rwbarton, wz1000, carter Differential Revision: https://phabricator.haskell.org/D5239
-
- 08 Dec, 2018 3 commits
-
-
Matthew Pickering authored
This flag can be set to turn off the Safe Haskell checks. Whether a module is marked Safe/Unsafe/Trustworthy is ignored when this flag to set. Reviewers: bgamari, tdammers Reviewed By: tdammers Subscribers: rwbarton, carter GHC Trac Issues: #15920 Differential Revision: https://phabricator.haskell.org/D5360
-
Ömer Sinan Ağacan authored
StgLint was incorrectly using isLocalId for bound id check to see whether an id is imported (in which case we don't expect it to be bound) or local. The problem with isLocalId is that its semantics changes after Core, as explained in the note: (last line) Note [GlobalId/LocalId] ~~~~~~~~~~~~~~~~~~~~~~~ A GlobalId is * always a constant (top-level) * imported, or data constructor, or primop, or record selector * has a Unique that is globally unique across the whole GHC invocation (a single invocation may compile multiple modules) * never treated as a candidate by the free-variable finder; it's a constant! A LocalId is * bound within an expression (lambda, case, local let(rec)) * or defined at top level in the module being compiled * always treated as a candidate by the free-variable finder After CoreTidy, top-level LocalIds are turned into GlobalIds We now pass current module as a parameter to StgLint, which uses it to see if an id should be bound (defined in the current module) or not (imported). Other changes: - Generalized StgLint to make it work on both StgTopBinding and CgStgTopBinding. - Bring all top-level binders into scope before linting top-level bindings to allow uses before definitions. TODO: We should remove the binder from local vars when checking RHSs of non-recursive bindings. Test Plan: This validates. Reviewers: simonpj, bgamari, sgraf Reviewed By: simonpj, sgraf Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5370
-
Ömer Sinan Ağacan authored
hscSimpleIface is returning a bool for whether there were _no changes_ in the iface file. The same bool is called "no_change_at_all" in mkIface_, and "no_change" in hscWriteIface and other functions. However it is called "changed" in HscMain.finish and hscMaybeWriteIface, which is confusing because "changed" and "no_change" have opposite meanings. This patch renames "changed" to "no_change" to fix this. Reviewers: simonpj, bgamari Reviewed By: bgamari Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5416
-
- 22 Nov, 2018 1 commit
-
-
David Eichmann authored
This patch fixes a fairly long-standing bug (dating back to 2015) in RdrName.bestImport, namely commit 9376249b Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Wed Oct 28 17:16:55 2015 +0000 Fix unused-import stuff in a better way In that patch got the sense of the comparison back to front, and thereby failed to implement the unused-import rules described in Note [Choosing the best import declaration] in RdrName This led to Trac #13064 and #15393 Fixing this bug revealed a bunch of unused imports in libraries; the ones in the GHC repo are part of this commit. The two important changes are * Fix the bug in bestImport * Modified the rules by adding (a) in Note [Choosing the best import declaration] in RdrName Reason: the previosu rules made Trac #5211 go bad again. And the new rule (a) makes sense to me. In unravalling this I also ended up doing a few other things * Refactor RnNames.ImportDeclUsage to use a [GlobalRdrElt] for the things that are used, rather than [AvailInfo]. This is simpler and more direct. * Rename greParentName to greParent_maybe, to follow GHC naming conventions * Delete dead code RdrName.greUsedRdrName Bumps a few submodules. Reviewers: hvr, goldfire, bgamari, simonmar, jrtc27 Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5312
-
- 19 Nov, 2018 1 commit
-
-
Sebastian Graf authored
Summary: Currently, `CoreToStg` annotates `StgRhsClosure`s with their set of non-global free variables. This free variable information is only needed in the final code generation step (i.e. `StgCmm.codeGen`), which leads to transformations such as `StgCse` and `StgUnarise` having to maintain this information. This is tiresome and unnecessary, so this patch introduces a trees-to-grow-like approach that only introduces the free variable set into the syntax tree in the code gen pass, along with a free variable analysis on STG terms to generate that information. Fixes #15754. Reviewers: simonpj, osa1, bgamari, simonmar Reviewed By: osa1 Subscribers: rwbarton, carter GHC Trac Issues: #15754 Differential Revision: https://phabricator.haskell.org/D5324
-
- 29 Oct, 2018 1 commit
-
-
Richard Eisenberg authored
This reverts commit 3a51abd0. I had hit the wrong button when trying to validate the original commit... and ended up committing it prematurely instead. This reversion commit also updates the comments to explain why we kind-generalise.
-
- 27 Oct, 2018 1 commit
-
-
mayac authored
Allow the user to explicitly bind type/kind variables in type and data family instances (including associated instances), closed type family equations, and RULES pragmas. Follows the specification of GHC Proposal 0007, also fixes #2600. Advised by Richard Eisenberg. This modifies the Template Haskell AST -- old code may break! Other Changes: - convert HsRule to a record - make rnHsSigWcType more general - add repMaybe to DsMeta Includes submodule update for Haddock. Test Plan: validate Reviewers: goldfire, bgamari, alanz Subscribers: simonpj, RyanGlScott, goldfire, rwbarton, thomie, mpickering, carter GHC Trac Issues: #2600, #14268 Differential Revision: https://phabricator.haskell.org/D4894
-
- 12 Jul, 2018 1 commit
-
-
Matthew Pickering authored
This allows modification of each `HsGroup` after it has been renamed. The old behaviour of keeping the renamed source until later can be recovered if desired by using the `keepRenamedSource` plugin but it shouldn't really be necessary as it can be inspected in the `TcGblEnv`. Reviewers: nboldi, bgamari, alpmestan Reviewed By: nboldi, alpmestan Subscribers: alpmestan, rwbarton, thomie, carter GHC Trac Issues: #15315 Differential Revision: https://phabricator.haskell.org/D4947
-
- 07 Jun, 2018 1 commit
-
-
Matthew Pickering authored
The primary motivation for this is that this allows users to access the warnings and error machinery present in TcM. However, it also allows users to use TcM actions which means they can typecheck GhcPs which could be significantly easier than constructing GhcTc. Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #15229 Differential Revision: https://phabricator.haskell.org/D4792
-
- 03 Jun, 2018 1 commit
-
-
lazac authored
Extend GHC plugins to access parsed, type checked representation, interfaces that are loaded. And splices that are evaluated. The goal is to enable development tools to access the GHC representation in the pre-existing build environment. See the full proposal here: https://ghc.haskell.org/trac/ghc/wiki/ExtendedPluginsProposal Reviewers: goldfire, bgamari, ezyang, angerman, mpickering Reviewed By: mpickering Subscribers: ezyang, angerman, mpickering, ulysses4ever, rwbarton, thomie, carter GHC Trac Issues: #14709 Differential Revision: https://phabricator.haskell.org/D4342
-
- 29 May, 2018 2 commits
-
-
Gabor Greif authored
-
Gabor Greif authored
-
- 16 May, 2018 1 commit
-
-
Simon Marlow authored
Summary: - Previously we would hvae a single big table of pointers per module, with a set of bitmaps to reference entries within it. The new representation is identical to a static constructor, which is much simpler for the GC to traverse, and we get to remove the complicated bitmap-traversal code from the GC. - Rewrite all the code to generate SRTs in CmmBuildInfoTables, and document it much better (see Note [SRTs]). This has been something I've wanted to do since we moved to the new code generator, I finally had the opportunity to finish it while on a transatlantic flight recently :) There are a series of 4 diffs: 1. D4632 (this one), which does the bulk of the changes 2. D4633 which adds support for smaller `CmmLabelDiffOff` constants 3. D4634 which takes advantage of D4632 and D4633 to save a word in info tables that have an SRT on x86_64. This is where most of the binary size improvement comes from. 4. D4637 which makes a further optimisation to merge some SRTs with static FUN closures. This adds some complexity and the benefits are fairly modest, so it's not clear yet whether we should do this. Results (after (3), on x86_64) - GHC itself (staticaly linked) is 5.2% smaller - -1.7% binary sizes in nofib, -2.9% module sizes. Full nofib results: P176 - I measured the overhead of traversing all the static objects in a major GC in GHC itself by doing `replicateM_ 1000 performGC` as the first thing in `Main.main`. The new version was 5-10% faster, but the results did vary quite a bit. - I'm not sure if there's a compile-time difference, the results are too unreliable. Test Plan: validate Reviewers: bgamari, michalt, niteria, simonpj, erikd, osa1 Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D4632
-
- 27 Apr, 2018 1 commit
-
-
Alan Zimmerman authored
Summary: - remove PostRn/PostTc fields - remove the HsVect In/Out distinction for Type, Class and Instance - remove PlaceHolder in favour of NoExt - Simplify OutputableX constraint Updates haddock submodule Test Plan: ./validate Reviewers: goldfire, bgamari Subscribers: goldfire, thomie, mpickering, carter Differential Revision: https://phabricator.haskell.org/D4625
-
- 02 Mar, 2018 1 commit
-
-
Matthew Pickering authored
Summary: This is part of D4342 which is worthwhile to merge on its own. Reviewers: nboldi, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4410Co-authored-by:
Boldizsar Nemeth <nboldi@elte.hu>
-
- 13 Feb, 2018 1 commit
-
-
Ömer Sinan Ağacan authored
This patch includes two changes: 1. Move cost centre collection from `SCCfinal` to `CorePrep`, to be able to collect cost centres in unfoldings. `CorePrep` drops unfoldings, so that's the latest stage in the compilation pipeline for this. After this change `SCCfinal` no longer collects all cost centres, but it still generates & collects CAF cost centres + updates cost centre stacks of `StgRhsClosure` and `StgRhsCon`s. This fixes #5889. 2. Initialize cost centre stack fields of `StgRhs` in `coreToStg`. With this we no longer need to update cost centre stack fields in `SCCfinal`, so that module is removed. Cost centre initialization explained in Note [Cost-centre initialization plan]. Because with -fcaf-all we need to attach a new cost-centre to each CAF, `coreTopBindToStg` now returns `CollectedCCs`. Test Plan: validate Reviewers: simonpj, bgamari, simonmar Reviewed By: simonpj, bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #5889 Differential Revision: https://phabricator.haskell.org/D4325
-
- 30 Oct, 2017 1 commit
-
-
Gabor Greif authored
-
- 03 Oct, 2017 1 commit
-
-
Douglas Wilson authored
`Hsc` is a reader monad in `HscEnv`. Several functions in HscMain were taking parameters of type `HscEnv` or `DynFlags`, and returning values of type `Hsc a`. This patch removes those parameters in favour of asking them from the context. This removes a source of confusion and should make refactoring a bit easier. Test Plan: ./validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4061
-
- 22 Sep, 2017 1 commit
-
-
Facundo Domínguez authored
This allows template-haskell code to add plugins to the compilation pipeline. Otherwise, the user would have to pass -fplugin=... to ghc. For now, plugin modules in the current package can't be used. This is because when TH runs, it is too late to let GHC know that the plugin modules needed to be compiled first. Test Plan: ./validate Reviewers: simonpj, bgamari, austin, goldfire Reviewed By: bgamari Subscribers: angerman, rwbarton, mboes, thomie GHC Trac Issues: #13608 Differential Revision: https://phabricator.haskell.org/D3821
-
- 19 Sep, 2017 1 commit
-
-
Herbert Valerio Riedel authored
This switches the compiler/ component to get compiled with -XNoImplicitPrelude and a `import GhcPrelude` is inserted in all modules. This is motivated by the upcoming "Prelude" re-export of `Semigroup((<>))` which would cause lots of name clashes in every modulewhich imports also `Outputable` Reviewers: austin, goldfire, bgamari, alanz, simonmar Reviewed By: bgamari Subscribers: goldfire, rwbarton, thomie, mpickering, bgamari Differential Revision: https://phabricator.haskell.org/D3989
-
- 13 Sep, 2017 1 commit
-
-
Alan Zimmerman authored
Summary: Previously the renamed source decls only were dumped, now the imports, exports and doc_hdr are too. Test Plan: ./validate Reviewers: bgamari, austin Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #14197 Differential Revision: https://phabricator.haskell.org/D3949
-
- 05 Sep, 2017 1 commit
-
-
alexbiehl authored
This is another take on https://phabricator.haskell.org/D3844. This patch removes then need for haddock to reimplement the calculation of exported names from modules. Instead when renaming export lists ghc annotates each IE with its exported names. Haddocks current export logic has caused lots of trouble in the past (on the Github issue tracker): - https://github.com/haskell/haddock/issues/121 - https://github.com/haskell/haddock/issues/174 - https://github.com/haskell/haddock/issues/225 - https://github.com/haskell/haddock/issues/344 - https://github.com/haskell/haddock/issues/584 - https://github.com/haskell/haddock/issues/591 - https://github.com/haskell/haddock/issues/597 Updates haddock submodule. Reviewers: austin, bgamari, ezyang Reviewed By: bgamari, ezyang Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3864
-
- 29 Aug, 2017 1 commit
-
-
David Feuer authored
Previously, `showAstData` produced a `String`. That `String` would then be converted to a `Doc` using `text` to implement `-ddump-parsed-ast`. But rendering `text` calculates the length of the `String` before doing anything else. Since the AST can be very large, this was bad: the whole dump string (potentially hundreds of millions of `Char`s) was accumulated in memory. Now, `showAstData` produces a `Doc` directly, which seems to work a lot better. As an extra bonus, the code is simpler and cleaner. The formatting has changed a bit, as the previous ad hoc approach didn't really match the pretty printer too well. If someone cares enough to request adjustments, we can surely make them. Reviewers: austin, bgamari, mpickering, alanz Reviewed By: bgamari Subscribers: mpickering, rwbarton, thomie GHC Trac Issues: #14161 Differential Revision: https://phabricator.haskell.org/D3894
-
- 18 Jul, 2017 1 commit
-
-
niteria authored
When loading/reloading with a large number of modules (>5000) the cost of linear lookups becomes significant. The changes here made `:reload` go from 6s to 1s on my test case. The bottlenecks were `needsLinker` in `DriverPipeline` and `getModLoop` in `GhcMake`. Test Plan: ./validate Reviewers: simonmar, austin, bgamari Subscribers: thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D3703
-
- 11 Jul, 2017 1 commit
-
-
patrickdoc authored
This change enables the addition of an arbitrary string to the output of GHCi's ':info'. It was made for Coercible in particular but could be extended if desired. Updates haddock submodule. Test Plan: Modified test 'ghci059' to match new output. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: goldfire, rwbarton, thomie GHC Trac Issues: #12390 Differential Revision: https://phabricator.haskell.org/D3634
-
- 06 Jul, 2017 1 commit
-
-
Gabor Greif authored
-
- 27 Jun, 2017 2 commits
-
-
Ben Gamari authored
I had not intended on merging this. This reverts commit b0708588.
-
niteria authored
When loading/reloading with a large number of modules (>5000) the cost of linear lookups becomes significant. The changes here made `:reload` go from 6s to 1s on my test case. The bottlenecks were `needsLinker` in `DriverPipeline` and `getModLoop` in `GhcMake`. Test Plan: ./validate Reviewers: simonmar, austin, bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3646
-
- 23 Jun, 2017 1 commit
-
-
Ben Gamari authored
Test Plan: Load program with StaticPointers into GHCi, ensure no tracing output makes it in. Reviewers: austin Subscribers: rwbarton, thomie, RyanGlScott GHC Trac Issues: #12356 Differential Revision: https://phabricator.haskell.org/D3663
-