summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Dont call unsafeGlobalDynFlags if it is not setThomas Miedema2015-03-169-20/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | Parsing of static and mode flags happens before any session is started, i.e., before the first call to 'GHC.withGhc'. Therefore, to report errors for invalid usage of these two types of flags, we can not call any function that needs DynFlags, as there are no DynFlags available yet (unsafeGlobalDynFlags is not set either). So we always print "on the commandline" as the location, which is true except for Api users, which is probably ok. When reporting errors for invalid usage of dynamic flags we /can/ make use of DynFlags, and we do so explicitly in DynFlags.parseDynamicFlagsFull. Before, we called unsafeGlobalDynFlags when an invalid (combination of) flag(s) was given on the commandline, resulting in panics (#9963). This regression was introduced in 1d6124de. Also rename showSDocSimple to showSDocUnsafe, to hopefully prevent this from happening again. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D730 GHC Trac Issues: #9963
* Fix testsuite driver for a profiling compilerThomas Miedema2015-03-161-0/+3
| | | | | | | | | This should have been part of commit 5258566ee5c8, to allow expansion of '{hp2ps}' in a command string to `config.hp2ps`. Reviewed by: austin Differential Revision: https://phabricator.haskell.org/D734
* Test Trac #10156Simon Peyton Jones2015-03-162-0/+16
|
* libraries/win32: update submoduleAustin Seipp2015-03-161-0/+0
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Update Cabal submodule to latest 1.22.1.2 snapshotHerbert Valerio Riedel2015-03-151-0/+0
| | | | | | | | This addresses the Cabal side of #10115 as this pulls in the following two commits: > Make sure to pass the package key to ghc > Haddock: Use --package-{name|version} when available
* Update Haddock submoduleHerbert Valerio Riedel2015-03-151-0/+0
| | | | | | This pulls in a cherry-picked commit adding support for the new `--package-name` and `--package-version` flags and thus helps addressing #10115.
* We need to import 'cast' on WindowsEdward Z. Yang2015-03-141-0/+2
| | | | | | | | | | | This fixes breakage introduced via 47b5b5c2b2c92ba091313c36489588edadceaa9d Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Reviewed By: hvr Differential Revision: https://phabricator.haskell.org/D732
* Link temporary shared objects with `--no-as-needed`Peter Trommler2015-03-141-5/+14
| | | | | | | | | | | | | | | | | | | | | | Some ELF link editors default to `--as-needed` and record only those libraries in DT_NEEDED tags that are needed to resolve undefined symbols in the shared object to be created. In Template Haskell we rely on all symbols that were defined in modules compiled so far to be available in the current temporary shared object. To prevent the link editor from dropping the DT_NEEDED tag for the previously linked temporary shared object we need to override the link editors default and specify `--no-as-needed` on the command line. This is for GNU ld and GOLD ld. This addresses #10110 TODO: regression test Reviewed By: hvr Differential Revision: https://phabricator.haskell.org/D731
* Move the function strip_quotes to testutil.pyThomas Miedema2015-03-132-4/+3
| | | | | | | | | | | | | | | | If one runs the testsuite with a profiling compiler, during the import of `testlib.py`, `testlib.py` sets the global variable `gs_working`. To do so, it executes a few statements which require the function `strip_quotes` to be in scope. But that function only gets defined at the very end of testlib.py. This patch moves the definition of `strip_quotes` to testutil.py, which is imported at the very top of testlib.py. This unbreaks the nightly builders. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D728
* Use the gold linker for linux/ARM and android/ARM targets.Erik de Castro Lopo2015-03-126-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #8976 and #9873 by making use of the Binutils ld.gold linker explicit whenever the target is linux/ARM or android/ARM. This does not affect iOS where Apple provides its own linker. In order to achieve this, we need to add `-fuse-ld=gold` to the SettingsCCompilerLinkFlags setting and set SettingsLdCommand to `ld.gold` (or `${target}-ld.gold` when cross-compiling). In addition, simplifying the use of `$(CONF_GCC_LINKER_OPTS_STAGEn)`. This patch was tested by ensuring that the following worked as expected: * Native builds on linux/x86_64 (nothing changed). * Native builds on linux/arm (and uses the gold linker). * Linux to linux/arm cross compiles (and uses the cross gold linker). Contributions by Ben Gamari, Joachim Breitner and Reid Barton. Reviewers: nomeata, bgamari, austin, rwbarton Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D715 GHC Trac Issues: #8976 #9873
* testsuite: use same flags for ghci way and scriptsThomas Miedema2015-03-111-1/+1
| | | | | | | | | The ghci script tests were using different RTS flags from the normal ghci tests. This commit makes them use the same flags. Reviewers: austin Differential Revision: https://phabricator.haskell.org/D724
* Update submodule hpc (includes fix for #9619)Thomas Miedema2015-03-111-0/+0
| | | | | | Reviewers: austin Differential Revision: https://phabricator.haskell.org/D704
* Cleanup test framework string formattingThomas Miedema2015-03-114-56/+56
| | | | | | | | | | | | * Use format strings instead of string concatenation. * Wrap `config.compiler`, `config.hpc` etc. in quotes in `mk/test.mk`, so we don't have to in .T scripts and driver/testlib.py. Update hpc submodule (test cleanup) Reviewers: austin Differential Revision: https://phabricator.haskell.org/D718
* Rename ty{Con,peRep}Hash to ty{Con,peRep}FingerprintHerbert Valerio Riedel2015-03-113-9/+9
| | | | | | | | | | | This is a follow-up change to 56e0ac98c3a439b8757a2e886db259270bdc85f0 See also discussion at https://groups.google.com/d/msg/haskell-core-libraries/e9N3U6nJeQE/V-TvG3G-3x4J Reviewed By: simonpj Differential Revision: https://phabricator.haskell.org/D726
* Update filepath submodule to filepath-1.4 snapshotHerbert Valerio Riedel2015-03-118-3/+3
| | | | | | This also needs to update a couple of other submodules to update the upper bound on filepath to allow this major version bump to 1.4.0.0
* Update Cabal submodule to latest 1.22 snapshotEdward Z. Yang2015-03-114-3/+7
| | | | | | | | | | | | | | | This changes the library file name format NOTE: This patch originally updated to Cabal HEAD, but was reduced to update to Cabal 1.22 HEAD by hvr as this is needed in order to update the filepath submodule to version 1.4.0, and subsequently to be cherry-picked into the ghc-7.10 branch Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D707
* Refactor testsuite with normalise_version()Edward Z. Yang2015-03-106-42/+32
| | | | | | | | | | | | | | | | | | | | Summary: This function generalizes the normaliseBytestringPackage and other similar one-off functions into normalise_version() with takes a package name to normalize against. This JUST manages package versions; we also could use a normalize for keys. In the process, I modified all the normalization functions to be accumulative; I don't think this makes a difference for current test cases but I think it makes things nicer. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D725
* Documentation for PackageArg/ModRenaming/PackageFlagEdward Z. Yang2015-03-101-11/+31
| | | | | | | | | | | | | | | Summary: [skip-ci] Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D723
* Update directory submodule to latest 1.2.2 snapshotHerbert Valerio Riedel2015-03-101-0/+0
|
* Sync up terminfo/haskeline submodule with ghc-7.10Herbert Valerio Riedel2015-03-102-0/+0
| | | | The GHC 7.10 tree was pointing to slightly newer commits
* Update array submodule (min ver bump to 0.5.1.0)Herbert Valerio Riedel2015-03-102-1/+1
|
* Update submodule to Cabal 1.22.1.1 releaseHerbert Valerio Riedel2015-03-101-0/+0
|
* ghc-prim : Hide 64 bit primops when the word size is 32 bits (fixes #9886).Erik de Castro Lopo2015-03-101-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | Summary: These primops were failing to compile on PowerPC (32 bit). There is also currently no way to call into these primops from Haskell code. Currently, the *only* way to call any of these C hs_atomic_* functions is via the fetch*IntArray primops which are only defined for Int values and Int is always the native word size. When these functions can be called (and tested) from Haskell code, then it will be worth while implementing them. Test Plan: Compile and run on x86, x86_64, powerpc and arm: testsuite/tests/concurrent/should_run/AtomicPrimops.hs Reviewers: tibbe, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D702 GHC Trac Issues: #9886
* Changes to Safe Haskell documentation from feedback (#10140).David Terei2015-03-091-97/+133
|
* Merge branch 'master' of git://git.haskell.org/ghcAndreas Voellmy2015-03-0911-276/+150
|\
| * Refactor Digraph to use Data.Graph when possibleEdward Z. Yang2015-03-092-263/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This just rewrites the IntGraph data type. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D708
| * Revert "Refactor Digraph to use Data.Graph when possible"Edward Z. Yang2015-03-092-41/+264
| | | | | | | | | | | | | | This breaks the build with GHC 7.6 bootstrapping, since the Functor SCC instance is not available. This reverts commit c439af5f5baa2c8af3434652554135230edbf5c3.
| * Fix `ghc --make -fhpc` with imported lhs modulesThomas Miedema2015-03-095-2/+95
| | | | | | | | | | | | | | | | | | See Note [Don't normalise input filenames] in `compiler/main/DriverPipeline.hs`. Fixes #2991. Reviewers: austin Differential Revision: https://phabricator.haskell.org/D701
| * Remove obsolete comment in cmmOffsetJoachim Breitner2015-03-091-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: as obviously, the code does _not_ adhere to the comment, and yet the compiler does _not_ go into an infinite loop. Test Plan: Run validate Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D719
| * Refactor Digraph to use Data.Graph when possibleEdward Z. Yang2015-03-092-264/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This just rewrites the IntGraph data type. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D708
| * hsc2hs: update submoduleAustin Seipp2015-03-091-0/+0
| | | | | | | | | | | | This includes the fix for #9524. Signed-off-by: Austin Seipp <austin@well-typed.com>
| * Update process submoduleThomas Miedema2015-03-092-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Rename `SysTools.readCreateProcess`. Functions `readCreateProcess` and `readCreateProcessWithExitCode` were added to `System.Process`, the former of which conflicts with `SysTools.readCreateProcess`. Reviewed by: austin Differential Revision: https://phabricator.haskell.org/D713
* | RTS/IOManager: fix trac issue #9722.Andreas Voellmy2015-03-092-2/+22
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Whenever the RTS has been inactive for idleGCDelayTime, the idle timer fires and calls wakeUpRts(), which in turn calls ioManagerWakeup(), which in turn writes a byte (or a few) to a file descriptor (stored in the io_manager_wakeup_fd variable) registered by the TimerManager and on which the TimerManager will wait. (Note that the write will only occur if the file descriptor is non-negative.) When the RTS shuts down, it shuts down the TimerManager, and in this process the file descriptor stored in io_manager_wakeup_fd is closed. In the error case, the idle timer fires after the close of the file occurs, and then the write() call in ioManagerWakeup() fails and the aforementioned error message gets printed. This patch solves the problem by (1) having the TimerManager (via Control) write -1 to io_manager_wakeup_fd just before closing the file descriptor written in io_manager_wakeup_fd, and (2) having ioManagerWakeup() ignore an error returned by write() in the case that the write returned -1 and the io_manager_wakeup_fd is -1. Reviewers: austin, simonmar, hvr, thomie Reviewed By: thomie Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D722 GHC Trac Issues: #9722
* Add `GHC.OldList` legacy moduleHerbert Valerio Riedel2015-03-073-0/+34
| | | | | | | | | | | | | | | This module provides access the list-specialised versions for legacy purposes (such as implementing Haskell2010-ish preludes). This module basically re-exports the hidden `Data.OldList` module (but in the less controversial `GHC.*` namespace, which signals less committment to keep this module around). This is legacy module is mostly for GHC 7.10's sake. What becomes long-term of `GHC.OldList` can be decided unhurriedly during the GHC 7.12 development cycle. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D689
* Define proper `MINIMAL` pragma for `class Ix`Herbert Valerio Riedel2015-03-072-2/+4
| | | | | | | | | | | | | | Summary: This addresses #10142 Reviewers: goldfire, austin, ekmett Reviewed By: austin, ekmett Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D709 GHC Trac Issues: #10142
* base: drop redundant Typeable derivingsHerbert Valerio Riedel2015-03-0741-121/+57
| | | | | | | | | | | Thanks to #9858 `Typeable` doesn't need to be explicitly derived anymore. This also makes `AutoDeriveTypeable` redundant, as well as some imports of `Typeable` (removal of whose may be beneficial to #9707). This commit removes several such now redundant use-sites in `base`. Reviewed By: austin, ekmett Differential Revision: https://phabricator.haskell.org/D712
* Store renamings as (ModuleName, ModuleName) pairs.Edward Z. Yang2015-03-072-12/+11
| | | | | | | | | | | | Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin, simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D710
* build: fix 'make help'Austin Seipp2015-03-072-2/+2
| | | | | | | | | | | | | | | | | Summary: This fixes the usage of `make help` in the top-level and subdirectories. Signed-off-by: Austin Seipp <austin@well-typed.com> Test Plan: It worked now and didn't before. Reviewers: hvr Reviewed By: hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D692
* Dynamically link all loaded packages in new objectPeter Trommler2015-03-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | Summary: As a result of fixing #8935 we needed to open shared libraries with RTLD_LOCAL and so symbols from packages loaded earlier cannot be found anymore. We need to include in the link all packages loaded so far. This fixes #10058 Test Plan: validate Reviewers: hvr, simonmar, austin Reviewed By: austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D676 GHC Trac Issues: #10058
* Improve core linter so it catches unsafeCoerce problems (T9122)Alexander Vershilov2015-03-078-21/+113
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is a draft of the patch that is sent for review. In this patch required changes in linter were introduced and actual check: - new helper function: primRepSizeB - primRep check for floating - Add access to dynamic flags in linter. - Implement additional lint rules. Reviewers: austin, goldfire, simonpj Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D637 GHC Trac Issues: #9122
* Don't assume tools are in same directory as ghc in some casesPhil Ruffwind2015-03-071-5/+18
| | | | | | | | | | | | | | Summary: Tools such as `ghc-pkg` and `runghc` are no longer required to be in the same directory as `ghc` when running tests, provided that `TEST_HC` is not explicitly set and an in-tree compiler is not used. Fixes #10126. Reviewers: thomie, austin Reviewed By: thomie, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D705 GHC Trac Issues: #10126
* Add missed test (uuugh)Austin Seipp2015-03-072-0/+24
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Custom `Typeable` solver, that keeps track of kinds.Iavor S. Diatchki2015-03-0731-574/+512
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This implements the new `Typeable` solver: when GHC sees `Typeable` constraints it solves them on the spot. The current implementation creates `TyCon` representations on the spot. Pro: No overhead at all in code that does not use `Typeable` Cons: Code that uses `Typeable` may create multipe `TyCon` represntations. We have discussed an implementation where representations of `TyCons` are computed once, in the module, where a datatype is declared. This would lead to more code being generated: for a promotable datatype we need to generate `2 + number_of_data_cons` type-constructro representations, and we have to do that for all programs, even ones that do not intend to use typeable. I added code to emit warning whenevar `deriving Typeable` is encountered--- the idea being that this is not needed anymore, and shold be fixed. Also, we allow `instance Typeable T` in .hs-boot files, but they result in a warning, and are ignored. This last one was to avoid breaking exisitng code, and should become an error, eventually. Test Plan: 1. GHC can compile itself. 2. I compiled a number of large libraries, including `lens`. - I had to make some small changes: `unordered-containers` uses internals of `TypeReps`, so I had to do a 1 line fix - `lens` needed one instance changed, due to a poly-kinded `Typeble` instance 3. I also run some code that uses `syb` to traverse a largish datastrucutre. I didn't notice any signifiant performance difference between the 7.8.3 version, and this implementation. Reviewers: simonpj, simonmar, austin, hvr Reviewed By: austin, hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D652 GHC Trac Issues: #9858
* Re-export `<$` from Prelude (#10113)Herbert Valerio Riedel2015-03-072-2/+2
| | | | | | | | | This is a follow-up to eb3661f2b9f8472f3714774126ebe1183484dd85 re-exporting `<$` from `Prelude` as well. Reviewed By: austin, ekmett Differential Revision: https://phabricator.haskell.org/D681
* Re-export `<$>` from Prelude (#10113)Herbert Valerio Riedel2015-03-0718-15/+21
| | | | | | | | | | | | | | | | | | | | | Whether to re-export the `<$>` non-method operator from `Prelude` wasn't explicitly covered in the original AMP proposal[1], but it turns out that not doing so forces most code that makes use of applicatives to import `Data.Functor` or `Control.Applicative` just to get that operator into scope. To this end, it was proposed to add `<$>` to Prelude as well[2]. The down-side is that this increases the amount of redundant-import warnings triggered, as well as the relatively minor issue of stealing the `<$>` operator from the default namespace for good (although at this point `<$>` is supposed to be ubiquitous anyway due to `Applicative` being implicitly required into the next Haskell Report) [1]: https://wiki.haskell.org/Functor-Applicative-Monad_Proposal [2]: http://thread.gmane.org/gmane.comp.lang.haskell.libraries/24161 Reviewed By: austin, ekmett Differential Revision: https://phabricator.haskell.org/D680
* Drop redundant LANGUAGE pragmasHerbert Valerio Riedel2015-03-071-1/+1
| | | | Due to refactoring & cleanups those pragmas have become redundant by now
* testsuite: format commands using config dictThomas Miedema2015-03-061-7/+17
| | | | | | | | | | | | | | | | | | | | | | Summary: Allow `cmd_wrapper` to return a format string that can refer to config values. Very useful! This allows for many tests to be defined in pure Python, instead of in an additional script or Makefile. Example: def Thpc(cmd): return(cmd + ' && {hpc} report Thpc.tix') test('Thpc', [cmd_wrapper(Thpc), only_ways['hpc']), compile_and_run, ['']) The `{hpc}` is replaced by the value of `config.hpc`. The result is that the module `Thpc` first gets compiled, then the binary `Thpc` is run, and then the `hpc report` command is run. The output of all of this is redirected (and later appended) to Thpc.run.stdout/stderr as normally. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D706
* Update shift/reduce commentary in Parser.yEdward Z. Yang2015-03-061-111/+272
| | | | | | | | | | | | Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: none Reviewers: austin, simonpj, simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D697
* Typos in docs [ci skip]Gabor Greif2015-03-061-2/+2
|
* testsuite: accept updated outputAustin Seipp2015-03-052-9/+9
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>