- Sep 16, 2016
-
-
Previously this was a relative path which worked in the GHC tree, but failed elsewhere. This caused trouble for out-of-tree users as well as Hadrian, which wants to move build artifacts out of the working directory. Fixes #8040. Test Plan: Validate Reviewers: thomie, austin, snowleopard, hvr Reviewed By: snowleopard, hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2530 GHC Trac Issues: #8040
-
- Sep 10, 2016
-
-
Ryan Scott authored
Summary: D2461 seemed to (inadvertently, I think) add the `-flocal-ghci-history` flag to the list of `defaultFlags` that are enabled automatically. As a result, every invocation of `ghci` caused a local GHCi history to be saved to the current directory, which probably shouldn't be the default. Test Plan: Run `ghci`, observe the lack of a `.ghci_history` file in your working directory Reviewers: austin, thomie, bgamari Reviewed By: bgamari Subscribers: ak3n Differential Revision: https://phabricator.haskell.org/D2520 GHC Trac Issues: #9089
-
- Sep 09, 2016
-
-
Alan Zimmerman authored
Summary: The external interpreter is launched by calling 'System.Process.createProcess' with a 'CreateProcess' parameter. The current value for this has the 'std_in', 'std_out' and 'std_err' fields use the default of 'Inherit', meaning that the remote interpreter shares the stdio with the original ghc/ghci process. This patch introduces a new hook to the DynFlags, which has an opportunity to override the 'CreateProcess' fields, launch the process, and retrieve the stdio handles actually used. So if a ghci external interpreter session is launched from the GHC API the stdio can be redirected if required, which is useful for tooling/IDE integration. Test Plan: ./validate Reviewers: austin, hvr, simonmar, bgamari Reviewed By: simonmar, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2518
-
- Sep 03, 2016
-
-
Gabor Greif authored
-
- Aug 31, 2016
-
-
Removes -Wredundant-constraints from -Wall, as per the discussion in #10635. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2498 GHC Trac Issues: #10635
-
Reviewers: simonpj, thomie, austin, bgamari Reviewed By: simonpj, thomie, bgamari Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D2458 GHC Trac Issues: #12170
-
Reviewers: thomie, bgamari, austin Reviewed By: thomie, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2461 GHC Trac Issues: #9089
-
Test Plan: Validate Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2491 GHC Trac Issues: #12206
-
Test Plan: Validate Reviewers: austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2492 GHC Trac Issues: #12398
-
- Aug 30, 2016
-
-
Previously interpreting the content of the .ghc.env files was done after the step that loaded the available package dbs. This meant that setting the package db flags was ineffective. This patch moves interpreting the env files before loading of the package dbs. Also, the package-db entries refer to files. Allow spaces in these file names. Also treat as comments lines beginning with "--". These are pretty minor fixes in a feature that up 'til now has been essentially unused (witness no bug report about it), so there's very low risk here. If we can get this into 8.0.2 then cabal can start generating the .ghc.environment files, otherwise it cannot as it needs the working package-db entries, to be able to refer to local package dbs in the build tree (or cabal nix store). Test Plan: Manually create example .ghc.env files run ghci; :show packages Done this. It works. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2476
-
Sergei Trofimovich authored
In Trac #9221 one of problems using high --jobs=<N> is amount of mutator (or GC) threads we crate. We use userspace spinning-and-yielding (see ACQUIRE_SPIN_LOCK) to acess work stealing queues. In case of N-worker-threads > N-CPUs fraction of time when thread holding spin lock gets descheduled by kernel increases. That causes other threads to waste CPU time before giving up CPU. Signed-off-by:
Sergei Trofimovich <siarheit@google.com> Test Plan: ghc --make -j8 and -j80 have comparable sys time on a 8-core system. Reviewers: austin, gintas, bgamari, simonmar Reviewed By: bgamari, simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2482 GHC Trac Issues: #9221
-
- Aug 26, 2016
-
-
Simon Peyton Jones authored
The import of UniqFM in HscTypes was only needed in stage2
-
- Aug 22, 2016
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- Aug 21, 2016
-
-
Edward Z. Yang authored
Summary: Kept this seperate from the previous patch for clarity. Comes with a test. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2220 GHC Trac Issues: #12035
-
Edward Z. Yang authored
Summary: This makes ghc --make's retypecheck behavior more in line with ghc -c, which is able to tie the knot as we are typechecking. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2213 GHC Trac Issues: #12035
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2246
-
Edward Z. Yang authored
Summary: initIfaceTc was originally used to make sure when we typecheck an interface, it can find the TyThings for things it itself defined. However, in the case of retypecheckLoop, this wasn't necessary because we ALREADY tied the knot through the HPT. This commit removes initIfaceTc, instead relying on the HPT to tie the knot. genModDetails' caller needed to be modified to tie the knot, but there are not that many call-sites of typecheckIface so the change is quite reasonable. We also introduce a new 'initIfaceLoad', which does NOT set up 'if_rec_types'. It's used when we're typechecking old, up-to-date interfaces in, since we're never going to update the type environment. The full details are in Note [Knot-tying typecheckIface]. Displeasingly, we need a special case to handle DFuns in the case of tcHiBootIface, see Note [DFun knot-tying special case] for the gory details. I also added another test which tickles a bug in a buggy version of this patch (see "Why the seq?") Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2349
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- Aug 08, 2016
-
-
Edward Z. Yang authored
There's a substantial bump to the haddock.Cabal allocation stats, because we added 50% more modules, so of course allocations are going to increase 50%. (But perhaps this is indicative of some bad constant factor in Haddock related to modules.) Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: ggreif, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2442
-
- Aug 05, 2016
-
-
Fixes #12062. Reviewers: bgamari, thomie, austin, simonmar Reviewed By: bgamari, thomie, simonmar Subscribers: simonmar, thomie Differential Revision: https://phabricator.haskell.org/D2415 GHC Trac Issues: #12062
-
- Jul 22, 2016
-
-
Simon Marlow authored
-
- Jul 21, 2016
-
-
Ömer Sinan Ağacan authored
Summary: This patch implements primitive unboxed sum types, as described in https://ghc.haskell.org/trac/ghc/wiki/UnpackedSumTypes. Main changes are: - Add new syntax for unboxed sums types, terms and patterns. Hidden behind `-XUnboxedSums`. - Add unlifted unboxed sum type constructors and data constructors, extend type and pattern checkers and desugarer. - Add new RuntimeRep for unboxed sums. - Extend unarise pass to translate unboxed sums to unboxed tuples right before code generation. - Add `StgRubbishArg` to `StgArg`, and a new type `CmmArg` for better code generation when sum values are involved. - Add user manual section for unboxed sums. Some other changes: - Generalize `UbxTupleRep` to `MultiRep` and `UbxTupAlt` to `MultiValAlt` to be able to use those with both sums and tuples. - Don't use `tyConPrimRep` in `isVoidTy`: `tyConPrimRep` is really wrong, given an `Any` `TyCon`, there's no way to tell what its kind is, but `kindPrimRep` and in turn `tyConPrimRep` returns `PtrRep`. - Fix some bugs on the way: #12375. Not included in this patch: - Update Haddock for new the new unboxed sum syntax. - `TemplateHaskell` support is left as future work. For reviewers: - Front-end code is mostly trivial and adapted from unboxed tuple code for type checking, pattern checking, renaming, desugaring etc. - Main translation routines are in `RepType` and `UnariseStg`. Documentation in `UnariseStg` should be enough for understanding what's going on. Credits: - Johan Tibell wrote the initial front-end and interface file extensions. - Simon Peyton Jones reviewed this patch many times, wrote some code, and helped with debugging. Reviewers: bgamari, alanz, goldfire, RyanGlScott, simonpj, austin, simonmar, hvr, erikd Reviewed By: simonpj Subscribers: Iceland_jack, ggreif, ezyang, RyanGlScott, goldfire, thomie, mpickering Differential Revision: https://phabricator.haskell.org/D2259
-
- Jul 16, 2016
-
-
The `-ddump-cmm` put all stages of Cmm processing into one output. This patch changes its behavior and adds two more options to make Cmm dumping flexible. - `-ddump-cmm-from-stg` dumps only initial version of Cmm right after STG->Cmm codegen - `-ddump-cmm` dumps the final result of the Cmm pipeline processing - `-ddump-cmm-verbose` dumps intermediate output of each Cmm pipeline step - `-ddump-cmm-proc` and `-ddump-cmm-caf` seems were lost. Now enabled Test Plan: ./validate Reviewers: thomie, simonmar, austin, bgamari Reviewed By: thomie, simonmar Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D2393 GHC Trac Issues: #11717
-
Test Plan: Try it Reviewers: hvr, simonmar, austin, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1722 GHC Trac Issues: #11094
-
- Jul 05, 2016
-
-
niteria authored
This localizes the nondeterminism that varEnvElts could have introduced, so that it's obvious that it's benign. Test Plan: ./validate Reviewers: simonpj, austin, bgamari Subscribers: thomie, simonmar Differential Revision: https://phabricator.haskell.org/D2390 GHC Trac Issues: #4012
-
Simon Peyton Jones authored
This is a tiny refactor, replacing an ad-hoc local function (TidyPgm.loookup_aux_id) with a solid global one (tidyVarOcc).
-
Simon Peyton Jones authored
-
- Jul 01, 2016
-
-
niteria authored
-
- Jun 28, 2016
-
-
Facundo Domínguez authored
Summary: We have the FloatOut pass create exported ids for floated StaticPtr bindings. The simplifier doesn't try to remove those. This patch also improves on 7fc20b by making a common definition collectStaticPtrSatArgs to test for StaticPtr binds. Fixes #12207. Test Plan: ./validate Reviewers: simonpj, austin, bgamari, simonmar, goldfire Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2366 GHC Trac Issues: #12207
-
- Jun 25, 2016
-
-
Summary: Commit 90538d86, seems to have broken static linking. The introduction of `argFixup` in `runLink` rearranges libs, and considers anything with an `-l` prefix or `.a` suffix a lib, which fails for libs that are just being linked together (e.g. `-o lib.a`). The proposed solution explicitly checks for the existance of the `-o` flag. Reviewers: rwbarton, erikd, Phyx, bgamari, austin Reviewed By: Phyx Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2362
-
- Jun 23, 2016
-
-
Richard Eisenberg authored
See the user's guide entry or the Note [TcRnExprMode] in TcRnDriver. Test cases: ghci/scripts/T{10963,11975}
-
niteria authored
We want to remove the `Ord Unique` instance because there's no way to implement it in deterministic way and it's too easy to use by accident. We sometimes compute SCC for datatypes whose Ord instance is implemented in terms of Unique. The Ord constraint on SCC is just an artifact of some internal data structures. We can have an alternative implementation with a data structure that uses Uniquable instead. This does exactly that and I'm pleased that I didn't have to introduce any duplication to do that. Test Plan: ./validate I looked at performance tests and it's a tiny bit better. Reviewers: bgamari, simonmar, ezyang, austin, goldfire Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2359 GHC Trac Issues: #4012
-
Simon Peyton Jones authored
lookupGRE_Name should return either zero or one GREs, never several. This is a consequence of INVARIANT 1 on GlobalRdrEnv. So it's better if it returns a Maybe; the panic on multiple results is put in one place, instead of being scattered or ignored. Just refactoring, no change in behaviour
-
- Jun 22, 2016
-
-
Gabor Greif authored
-
- Jun 18, 2016
-
-
Thomas Miedema authored
Reviewed by: bgamari Differential Revision: https://phabricator.haskell.org/D2331 GHC Trac Issues: #12192
-
- Jun 17, 2016
-
-
Ömer Sinan Ağacan authored
This also makes the behavior the same with frontend plugin errors -- frontend was failing with an exception (`CmdLineError`) while the simplifier was just ignoring plugins. Now we abort with `CmdLineError` in both cases with a slightly improved error message. Test Plan: - add tests (will add tests once #12197 is implemented) - validate (done) Reviewers: austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2334 GHC Trac Issues: #11690
-
- Jun 15, 2016
-
-
Simon Peyton Jones authored
Before this patch, following the TypeInType innovations, each TyCon had two lists: - tyConBinders :: [TyBinder] - tyConTyVars :: [TyVar] They were in 1-1 correspondence and contained overlapping information. More broadly, there were many places where we had to pass around this pair of lists, instead of a single list. This commit tidies all that up, by having just one list of binders in a TyCon: - tyConBinders :: [TyConBinder] The new data types look like this: Var.hs: data TyVarBndr tyvar vis = TvBndr tyvar vis data VisibilityFlag = Visible | Specified | Invisible type TyVarBinder = TyVarBndr TyVar VisibilityFlag TyCon.hs: type TyConBinder = TyVarBndr TyVar TyConBndrVis data TyConBndrVis = NamedTCB VisibilityFlag | AnonTCB TyCoRep.hs: data TyBinder = Named TyVarBinder | Anon Type Note that Var.TyVarBdr has moved from TyCoRep and has been made polymorphic in the tyvar and visiblity fields: type TyVarBinder = TyVarBndr TyVar VisibilityFlag -- Used in ForAllTy type TyConBinder = TyVarBndr TyVar TyConBndrVis -- Used in TyCon type IfaceForAllBndr = TyVarBndr IfaceTvBndr VisibilityFlag type IfaceTyConBinder = TyVarBndr IfaceTvBndr TyConBndrVis -- Ditto, in interface files There are a zillion knock-on changes, but everything arises from these types. It was a bit fiddly to get the module loops to work out right! Some smaller points ~~~~~~~~~~~~~~~~~~~ * Nice new functions TysPrim.mkTemplateKiTyVars TysPrim.mkTemplateTyConBinders which help you make the tyvar binders for dependently-typed TyCons. See comments with their definition. * The change showed up a bug in TcGenGenerics.tc_mkRepTy, where the code was making an assumption about the order of the kind variables in the kind of GHC.Generics.(:.:). I fixed this; see TcGenGenerics.mkComp.
-
Simon Peyton Jones authored
With TypeInType Richard combined ForAllTy and FunTy, but that was often awkward, and yielded little benefit becuase in practice the two were always treated separately. This patch re-introduces FunTy. Specfically * New type data TyVarBinder = TvBndr TyVar VisibilityFlag This /always/ has a TyVar it. In many places that's just what what we want, so there are /lots/ of TyBinder -> TyVarBinder changes * TyBinder still exists: data TyBinder = Named TyVarBinder | Anon Type * data Type = ForAllTy TyVarBinder Type | FunTy Type Type | .... There are a LOT of knock-on changes, but they are all routine. The Haddock submodule needs to be updated too
-
- Jun 14, 2016
-
-
Thomas Miedema authored
`readProcessEnvWithExitCode` was added in 4d4d0770, to start an external process after making some modifications to the environment. Since then, the `process` library has exposed `readCreateProcessWithExitCode`, which allows for the refactoring we do here. Also change "en" to "C", as suggested in ticket:8825#comment:11. Reviewed by: trofi Differential Revision: https://phabricator.haskell.org/D2332 GHC Trac Issues: #8825
-