summaryrefslogtreecommitdiff
path: root/utils
Commit message (Collapse)AuthorAgeFilesLines
* Fix path in cabal fileMateusz Kowalczyk2014-08-081-0/+0
| | | | Update Haddock submodule
* Update Haddock to attoparsec-0.12.1. Adjust perf.Mateusz Kowalczyk2014-08-081-0/+0
| | | | | Please adjust the perf number on your platform if/when it fails. It should improve slightly. Updates submodule.
* [no-ci] Track Haddock submodule change: ignore TAGS.Edward Z. Yang2014-08-071-0/+0
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Update Haddock submodule to know about profiling.Edward Z. Yang2014-08-051-0/+0
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Refactor package state, also fixing a module reexport bug.Edward Z. Yang2014-08-051-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of building a multiply indirected data structure and querying it on every import, we now have two data structures moduleToPkgConf and moduleToPkgConfAll. moduleToPkgConf is a single-level UniqFM that is intended to be used for most valid imports; however, it does not contain any information useful for error reporting. If an error is occurred, we then query moduleToPkgConfAll, which contains a more comprehensive view of the package database. This field is lazily initialized (so this means we're retaining the package database list, but this should be fine because we're already maintaining the entries of the list.) Additionally, the full view doesn't keep track of a boolean toggle for visibility/exposure anymore, but instead tracks the *provenance* of how the module binding came to be (the ModuleOrigin data type). Additionally, we move the logic for determining if a module is exposed or not from Finder.lhs and put it in Packages.lhs; this information is communicated via the LookupResult data type. Unfortunately, we can't directly return a FindResult, because this data type is defined in HscTypes which depends on Packages. This is going to change some more in the near future when I add thinning/renaming to package flags; the error messages will need to be more flexible. I've also slightly changed the semantics of error messages for package qualified imports. Previously, if we didn't find any package qualified imports, but there were hidden modules in a *different* package, the error message would prefer mentioning those as opposed to providing suggestions. Now, if a module is hidden but in the wrong package, we won't mention it; instead, it will get mentioned with the other module suggestions. I was too lazy to write a test, but I can add one if people would like. The module reexport bug was, package q reexported p:P as Conflict, and package r reexported p:P2 as Conflict, this was *not* reported as a conflict, because the old logic incorrectly decided that P and P2 were the same module on account of being from the same package. The logic here has been corrected. Contains haddock submodule update. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Disable ghc-pkg accepting multiple package IDs (differing package keys) for now.Edward Z. Yang2014-08-051-5/+4
| | | | | | | | | | | | | Duncan requested that ghc-pkg not accept duplicate package IDs (foo-0.1) by default until the higher level tools can accommodate it. Until then you'll need to use the --multi-instance flag to install multiple copies in the package database. I think reusing the --multi-instance flag is dodgy, because that can be used to cause duplicate package keys; but there is a mode of use of the database where package keys are unique. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Package keys (for linking/type equality) separated from package IDs.Edward Z. Yang2014-08-052-14/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch set makes us no longer assume that a package key is a human readable string, leaving Cabal free to "do whatever it wants" to allocate keys; we'll look up the PackageId in the database to display to the user. This also means we have a new level of qualifier decisions to make at the package level, and rewriting some Safe Haskell error reporting code to DTRT. Additionally, we adjust the build system to use a new ghc-cabal output Make variable PACKAGE_KEY to determine library names and other things, rather than concatenating PACKAGE/VERSION as before. Adds a new `-this-package-key` flag to subsume the old, erroneously named `-package-name` flag, and `-package-key` to select packages by package key. RFC: The md5 hashes are pretty tough on the eye, as far as the file system is concerned :( ToDo: safePkg01 test had its output updated, but the fix is not really right: the rest of the dependencies are truncated due to the fact the we're only grepping a single line, but ghc-pkg is wrapping its output. ToDo: In a later commit, update all submodules to stop using -package-name and use -this-package-key. For now, we don't do it to avoid submodule explosion. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, simonmar, hvr, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D80
* Refactor PatSynBind so that we can pass around PSBs instead of several argumentsDr. ERDI Gergo2014-07-291-1/+1
|
* Support ghc-pkg --ipid to query package ID.Edward Z. Yang2014-07-281-34/+56
| | | | | | | | | | | | Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: hvr, simonmar, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D98
* Module reexports, fixing #8407.Edward Z. Yang2014-07-255-7/+58
| | | | | | | | | | | | | | | | | | | | | | | | | The general approach is to add a new field to the package database, reexported-modules, which considered by the module finder as possible module declarations. Unlike declaring stub module files, multiple reexports of the same physical package at the same name do not result in an ambiguous import. Has submodule updates for Cabal and haddock. NB: When a reexport renames a module, that renaming is *not* accessible from inside the package. This is not so much a deliberate design choice as for implementation expediency (reexport resolution happens only when a package is in the package database.) TODO: Error handling when there are duplicate reexports/etc is not very well tested. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Conflicts: compiler/main/HscTypes.lhs testsuite/.gitignore utils/haddock
* Update Cabal submodule to HEAD (1.21)Edward Z. Yang2014-07-212-2/+2
| | | | This reverts commit f23b2129aca24beb4ece0d5915f67c448dc64ae4.
* Documentation for substringCheck.Edward Z. Yang2014-07-211-0/+22
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Rename PackageId to PackageKey, distinguishing it from Cabal's PackageId.Edward Z. Yang2014-07-211-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, both Cabal and GHC defined the type PackageId, and we expected them to be roughly equivalent (but represented differently). This refactoring separates these two notions. A package ID is a user-visible identifier; it's the thing you write in a Cabal file, e.g. containers-0.9. The components of this ID are semantically meaningful, and decompose into a package name and a package vrsion. A package key is an opaque identifier used by GHC to generate linking symbols. Presently, it just consists of a package name and a package version, but pursuant to #9265 we are planning to extend it to record other information. Within a single executable, it uniquely identifies a package. It is *not* an InstalledPackageId, as the choice of a package key affects the ABI of a package (whereas an InstalledPackageId is computed after compilation.) Cabal computes a package key for the package and passes it to GHC using -package-name (now *extremely* misnamed). As an added bonus, we don't have to worry about shadowing anymore. As a follow on, we should introduce -current-package-key having the same role as -package-name, and deprecate the old flag. This commit is just renaming. The haddock submodule needed to be updated. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, simonmar, hvr, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D79 Conflicts: compiler/main/HscTypes.lhs compiler/main/Packages.lhs utils/haddock
* [ghc-pkg] Fix #5442 by using the flag db stack to modify packages.Edward Z. Yang2014-07-211-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, the full database stack was used for ghc-pkg to modify packages, which meant that commands like 'ghc-pkg unregister --user' worked the same as 'ghc-pkg unregister'. Since package modification is a "read and write" operation, we should use the flag db stack (which is currently used for reads) to determine which database to update. There is also a new flag --user-package-db, which lets you explicitly set the user database (as seen by --user). This was mostly added to aid in testing, but could be useful for end users as well. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonmar, hvr, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D84
* vagrant: move files aroundAustin Seipp2014-07-202-0/+7
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* utils: remove old pvm scriptsAustin Seipp2014-07-203-89/+0
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* utils: delete obsolete heap-view programAustin Seipp2014-07-2010-1318/+0
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Revert "Update Cabal submodule to HEAD (1.21)"Edward Z. Yang2014-07-202-2/+2
| | | | | This reverts commit af28e61c7e84b8eb89fdfd9671af83a2a13f554a. We'll wait until it's possible to bootstrap from 7.6 out of the box.
* Update Cabal submodule to HEAD (1.21)Edward Z. Yang2014-07-182-2/+2
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Entirely re-jig the handling of default type-family instances (fixes Trac #9063)Simon Peyton Jones2014-07-151-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | In looking at Trac #9063 I decided to re-design the default instances for associated type synonyms. Previously it was all jolly complicated, to support generality that no one wanted, and was arguably undesirable. Specifically * The default instance for an associated type can have only type variables on the LHS. (Not type patterns.) * There can be at most one default instances declaration for each associated type. To achieve this I had to do a surprisingly large amount of refactoring of HsSyn, specifically to parameterise HsDecls.TyFamEqn over the type of the LHS patterns. That change in HsDecls has a (trivial) knock-on effect in Haddock, so this commit does a submodule update too. The net result is good though. The code is simpler; the language specification is simpler. Happy days. Trac #9263 and #9264 are thereby fixed as well.
* ghc-pkg register/update --enable-multi-instanceAustin Seipp2014-07-021-13/+36
| | | | | | | | | | | | | | | | | | | | | Summary: New flag to ghc-pkg register/update to lift the restriction on multiple instances of the same package version being in a db at once. Lifting the restriction is easy. The tricky bit is checking ghc does something sensible, but from the reading of the code it should treat such instances the same way it does with multiple instances between multiple DBs. We'll also need a way to unregister by installed package id. Test Plan: need to test that ghc is doing what we expect, at least if you use it like -hide-all-packages -package-id this -package-id that Reviewers: ezyang, simonmar Reviewed By: simonmar Subscribers: relrod Projects: #ghc Differential Revision: https://phabricator.haskell.org/D32
* Update Haddock submodule with Iavor's validate fix.Edward Z. Yang2014-07-011-0/+0
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Add a cast to new code in hp2psReid Barton2014-06-301-1/+1
| | | | | For parallelism with the existing code. I don't think it should make any difference.
* Avoid integer overflow in hp2ps (#9145)Reid Barton2014-06-301-3/+8
| | | | | This is slightly hackish, but hp2ps is already convoluted enough that I don't feel bad about it.
* Fix few Haddock parser brainfartsMateusz Kowalczyk2014-06-251-0/+0
| | | | Updates submodule
* Fix anchors in HaddockMateusz Kowalczyk2014-06-251-0/+0
| | | | Updates submodule
* Convert loose sub-repos into proper submodules (re #8545)Herbert Valerio Riedel2014-06-251-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically, the following sub-repos/modules are converted: - libffi-tarballs - libraries/array - libraries/deepseq - libraries/directory - libraries/dph - libraries/filepath - libraries/haskell2010 - libraries/haskell98 - libraries/hoopl - libraries/hpc - libraries/old-locale - libraries/old-time - libraries/parallel - libraries/process - libraries/stm - libraries/unix - nofib - utils/hsc2hs N.B. ghc-tarballs is not converted as it will probably be handled differently in the future. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* haddock-library: allow 7.4.x buildingMateusz Kowalczyk2014-06-191-0/+0
| | | | Updates submodule
* Haddock: haddock-library release and Travis stuffMateusz Kowalczyk2014-06-181-0/+0
| | | | Updates submodule.
* Make the matcher and wrapper Ids in PatSyn into LocalIds, not GlobalIdsSimon Peyton Jones2014-06-061-0/+0
| | | | | | | | | | | | | | | | | | | | This was a serious bug, exposed by Trac #9175. The matcher and wrapper must be LocalIds, like record selectors and dictionary functions, for the reasons now documented in Note [Exported LocalIds] in Id.lhs In fixing this I found - PatSyn should have an Id inside it (apart from the wrapper and matcher) It should be a Name. Hence psId --> psName, with knock-on consequences - Tidying of PatSyns in TidyPgm was wrong - The keep-alive set in Desugar.deSugar (now) doesn't need pattern synonyms in it I also cleaned up the interface to PatSyn a little, so there's a tiny knock-on effect in Haddock; hence the haddock submodule update. It's very hard to make a test for this bug, so I haven't.
* TypoGabor Greif2014-06-051-1/+1
|
* Per-capability nursery weak pointer lists, fixes #9075Edward Z. Yang2014-05-291-0/+2
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Update Haddock submodule.Mateusz Kowalczyk2014-05-291-0/+0
| | | | | | This doesn't make any actual changes as to what the source looked like at previous commit we were pointing to but I made some foolish reverts that I now have to accomodate for. Sorry!
* Store IfExtNames for PatSyn matchers and wrappers in interface file.Dr. ERDI Gergo2014-05-271-0/+0
| | | | | | | This way, the Ids for the matchers/wrappers are reused by importing modules, and thus unfoldings are kept. Also updates haddock submodule to accomodate tweaks in PatSyn representation
* Harden imports in `DeriveConstants.hs` moduleHerbert Valerio Riedel2014-05-201-12/+12
| | | | | | | | This was generated by applying `-ddump-minimal-imports` and addresses the current compile failure (see #9016) with GHC HEAD due to the new `die` being exported by `System.Exit` Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Extract derived constants from nm output for various OSes differently.Christian Maeder2014-05-181-22/+15
| | | | | | | | | | | | | Fixes #8783. In order to avoid querying the nm version that does not work on Mac OS X we use the "nm -P" output that is supposed to produce (more portable) POSIX output and works on all tested OSes (MinGW, Mac OS X, Solaris and Linux using GNU nm) although slightly different (as documented). The "nm -P" output is actually only needed to recognize the output of a non-GNU Solaris nm (all other OSes produce sane outut using "nm" only). Signed-off-by: Austin Seipp <austin@well-typed.com>
* Drop default-extensions:CPP in hpc-bin.cabalHerbert Valerio Riedel2014-05-151-1/+0
| | | | | | | The utils/hpc/*.hs code doesn't use any CPP statements anyway, so this extensions was redundantly enabled to begin with. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Avoid NondecreasingIndentation syntax in ghc-pkgHerbert Valerio Riedel2014-05-152-31/+31
| | | | | | | | | This also makes ghc-pkg.cabal `default-extensions`-free NB: Printing this commit via `git show --ignore-all-spaces` shows the only non-whitespaces changes are in `ghc-pkg.cabal` Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Add missing stack checks to stg_ap_* functions (#9001)Simon Marlow2014-05-141-116/+198
|
* Remove LANGUAGE pragrams implied by Haskell2010Herbert Valerio Riedel2014-05-146-9/+4
| | | | | | | | | Haskell2010 implies (at least) EmptyDataDecls, ForeignFunctionInterface, PatternGuards, DoAndIfThenElse, and RelaxedPolyRec. This is a follow-up to dd92e2179e3171a0630834b773c08d416101980d Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Set cabal files to default-language:Haskell2010Herbert Valerio Riedel2014-05-149-11/+22
| | | | | | | This is a first step towards eliminating `default-extensions` in favour of per-file declared `{-# LANGUAGE ... #-}` pragmas. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Update Haddock submodule.Mateusz Kowalczyk2014-05-141-0/+0
| | | | | | | This splits up Haddock up a bit to allow use of its parser (and in the future perhaps more) without GHC dependency. It should build fine with the regular work-flow but if you get problems with building Haddock then please revert this and let me know.
* Revert "Per-thread allocation counters and limits"Simon Marlow2014-05-041-1/+0
| | | | | | | | Problems were found on 32-bit platforms, I'll commit again when I have a fix. This reverts the following commits: 54b31f744848da872c7c6366dea840748e01b5cf b0534f78a73f972e279eed4447a5687bd6a8308e
* Remove external coreAustin Seipp2014-05-031-5/+1
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Update Haddock submodule ref. Fixes `cabal test'.Mateusz Kowalczyk2014-05-031-0/+0
|
* Per-thread allocation counters and limitsSimon Marlow2014-05-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | This tracks the amount of memory allocation by each thread in a counter stored in the TSO. Optionally, when the counter drops below zero (it counts down), the thread can be sent an asynchronous exception: AllocationLimitExceeded. When this happens, given a small additional limit so that it can handle the exception. See documentation in GHC.Conc for more details. Allocation limits are similar to timeouts, but - timeouts use real time, not CPU time. Allocation limits do not count anything while the thread is blocked or in foreign code. - timeouts don't re-trigger if the thread catches the exception, allocation limits do. - timeouts can catch non-allocating loops, if you use -fno-omit-yields. This doesn't work for allocation limits. I couldn't measure any impact on benchmarks with these changes, even for nofib/smp.
* Replace all #!/usr/bin/perl with #!/usr/bin/env perlJoachim Breitner2014-04-301-1/+4
| | | | As suggested in #9057.
* rts: Add an initial Coverity modelAustin Seipp2014-04-291-0/+112
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Fix memleak in hp2psNicolas Trangez2014-04-271-0/+2
| | | | | | Issue discovered by Coverity scan, CID 43167. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Fix potential out-of-bound memory accessNicolas Trangez2014-04-271-2/+2
| | | | | | Issue discovered by Coverity scan, CID 43165. Signed-off-by: Austin Seipp <austin@well-typed.com>