summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Tidy up tidyingSimon Peyton Jones2016-07-051-8/+2
| | | | | This is a tiny refactor, replacing an ad-hoc local function (TidyPgm.loookup_aux_id) with a solid global one (tidyVarOcc).
* Make unique auxiliary function names in derivingSimon Peyton Jones2016-07-056-143/+168
| | | | | | | | | In deriving for Data, we make some auxiliary functions, but they didn't always get distinct names (Trac #12245). This patch fixes it by using the same mechanism as for dictionary functions, namely chooseUniqueOccTc. Some assocated refactoring came along for the ride.
* Delete out-of-date commentSimon Peyton Jones2016-07-051-3/+0
|
* Use DVarEnv for vectInfoVarBartosz Nitka2016-07-058-33/+40
| | | | | | | | | This makes sure that we don't introduce unnecessary nondeterminism from vectorization. Also updates dph submodule to reflect the change in types. GHC Trac: #4012
* Extra ASSERTs for nameModuleSimon Peyton Jones2016-07-052-2/+3
|
* Check generic-default method for ambiguitySimon Peyton Jones2016-07-0512-39/+125
| | | | | | | | | | Fixes Trac #7497 and #12151. In some earlier upheaval I introduced a bug in the ambiguity check for genreric-default method. This patch fixes it. But in fixing it I realised that the sourc-location of any such error message was bogus, so I fixed that too, which involved a slightly wider change; see the comments with TcMethInfo.
* Kill some varEnvEltsBartosz Nitka2016-07-051-7/+21
| | | | | | | I was able to hide the nondeterminism in some specialized function, which I believe will be useful in other places. GHC Trac: #4012
* Revert "Linker: some extra debugging / logging"Simon Marlow2016-07-051-25/+0
| | | | This reverts commit 6377757918c1e7f63638d6f258cad8d5f02bb6a7.
* Revert "Fix 32-bit build failures"Simon Marlow2016-07-051-7/+4
| | | | This reverts commit 01f449f4ffd2c4f23bfe5698b9f1b98a86276900.
* Enum: Ensure that operations on Word fuseBen Gamari2016-07-041-14/+138
| | | | | | | | | | | | Test Plan: Validate, verify fusion Reviewers: austin, hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2376 GHC Trac Issues: #12354
* CallArity: Use not . null instead of length > 0Ben Gamari2016-07-041-1/+1
| | | | | | | | | | Test Plan: Validate Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2381
* users-guide: Remove static field type from rts-flagBen Gamari2016-07-041-1/+0
| | | | This was introduced by a cut-and-paste error.
* Treat duplicate pattern synonym signatures as an errorSeraphime Kirkovski2016-07-044-0/+14
| | | | | | | | | | | | | | | | | | | | | | | Fixes issue T12165 by banning duplicate pattern synonyms signatures. This seems to me the best solution because: 1) it is coherent with the way we treat other duplicate signatures 2) the typechecker currently doesn't try to apply a second signature to a pattern to see if it matches, probably because it assumes there is no more than one signature per object. Test Plan: ./validate Reviewers: goldfire, austin, mpickering, bgamari Reviewed By: mpickering, bgamari Subscribers: mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2361 GHC Trac Issues: #12165
* testsuite: Add testcase for #12355Ben Gamari2016-07-042-0/+8
| | | | | | | | | | | | | | Test Plan: Validate Reviewers: austin, osa1 Reviewed By: osa1 Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2377 GHC Trac Issues: #12355
* users-guide: Note multiple pattern signature change in relnotesBen Gamari2016-07-042-0/+6
|
* base: Add release date to changelogBen Gamari2016-07-041-1/+1
|
* MkCore: Fix some note namesÖmer Sinan Ağacan2016-07-041-7/+7
|
* Fix 32-bit build failuresSimon Marlow2016-07-041-4/+7
|
* Kill varEnvElts in seqDmdEnvBartosz Nitka2016-07-012-3/+8
| | | | GHC Trac: #4012
* Document some benign nondeterminismBartosz Nitka2016-07-011-2/+8
|
* Remove uniqSetToListBartosz Nitka2016-07-0112-48/+86
| | | | | | | This documents nondeterminism in code generation and removes the nondeterministic ufmToList function. In the future someone will have to use nonDetEltsUFM (with proper explanation) or pprUFM.
* Linker: some extra debugging / loggingSimon Marlow2016-07-011-0/+25
|
* Remove unused oc->isImportLib (#12230)Simon Marlow2016-07-012-8/+1
| | | | | | | | | | | | | | | | | | | | Summary: This field is never set, but it was being tested and used to decide whether to resolve an object or not. This caused non-deterministic crashes when using the RTS linker (see #12230). I suspect this is not the correct fix, but putting it up so that Phyx can tell us what the right fix should be. Test Plan: validate Reviewers: austin, Phyx, bgamari, erikd Subscribers: erikd, thomie, ezyang Differential Revision: https://phabricator.haskell.org/D2371 GHC Trac Issues: #12230
* rules/sphinx.mk: stop xelatex on errorMarkus Rothe2016-07-011-5/+5
| | | | This avoids the interactive prompt of xelatex on error.
* Allow one type signature for multiple pattern synonymsMatthew Pickering2016-07-0111-21/+34
| | | | | | | | | This makes pattern synonym signatures more consistent with normal type signatures. Updates haddock submodule. Differential Revision: https://phabricator.haskell.org/D2083
* Add NamedThing (GenLocated l e) instanceBen Gamari2016-07-011-0/+3
|
* users-guide: Fix markup in release notesBen Gamari2016-07-011-1/+1
|
* Testsuite: be less strict about topHandler03's stderrThomas Miedema2016-07-011-1/+4
| | | | Fixes #12343.
* Fix check_uniques in non-unicode localeThomas Miedema2016-06-301-1/+2
| | | | | | | | | Testcase: `LC_ALL=C make -C utils/checkUniques`. Works with python2 and python3. Reviewed by: bgamari Differential Revision: https://phabricator.haskell.org/D2372
* CmmExpr: remove unused `vgcFlag` functionMichal Terepeta2016-06-301-6/+1
| | | | | | | | | | | | Test Plan: validate Reviewers: austin, bgamari, simonmar Reviewed By: bgamari, simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2351
* ghc-pkg: Drop trailing slashes in computing db pathsBen Gamari2016-06-301-1/+1
| | | | | | | | | | | | Test Plan: Validate, try tests in ticket Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2336 GHC Trac Issues: #12194
* nativeGen: Allow -fregs-graph to be usedBen Gamari2016-06-302-15/+19
| | | | | | | | | | | | | | | | Previously the flag was silently ignored due the #7679 and #8657. This, however, seems unnecessarily brutal and makes experimentation unduly difficult for users. Test Plan: Validate Reviewers: austin, simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2335 GHC Trac Issues: #7679, #8657
* Trac #11554 fix loopy GADTsAlexander Vieth2016-06-305-8/+43
| | | | | | | | | | | | | | Summary: Fixes T11554 Reviewers: goldfire, thomie, simonpj, austin, bgamari Reviewed By: thomie, simonpj, bgamari Subscribers: simonpj, goldfire, thomie Differential Revision: https://phabricator.haskell.org/D2283 GHC Trac Issues: #11554
* Updates to handle new CabalEdward Z. Yang2016-06-3011-28/+41
| | | | | | | | | | | | | | | | | | Specifically per-component macros and multiple libraries. Contains Cabal submodule update. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin, bgamari Reviewed By: austin, bgamari Subscribers: hvr, thomie Differential Revision: https://phabricator.haskell.org/D2059
* Axe RecFlag on TyCons.Edward Z. Yang2016-06-3013-350/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit removes the information about whether or not a TyCon is "recursive", as well as the code responsible for calculating this information. The original trigger for this change was complexity regarding how we computed the RecFlag for hs-boot files. The problem is that in order to determine if a TyCon is recursive or not, we need to determine if it was defined in an hs-boot file (if so, we conservatively assume that it is recursive.) It turns that doing this is quite tricky. The "obvious" strategy is to typecheck the hi-boot file (since we are eventually going to need the typechecked types to check if we properly implemented the hi-boot file) and just extract the names of all defined TyCons from the ModDetails, but this actually does not work well if Names from the hi-boot file are being knot-tied via if_rec_types: the "extraction" process will force thunks, which will force the typechecking process earlier than we have actually defined the types locally. Rather than work around all this trickiness (it certainly can be worked around, either by making interface loading MORE lazy, or just reading of the set of defined TyCons directly from the ModIface), we instead opted to excise the source of the problem, the RecFlag. For one, it is not clear if the RecFlag even makes sense, in the presence of higher-orderness: data T f a = MkT (f a) T doesn't look recursive, but if we instantiate f with T, then it very well is! It was all very shaky. So we just don't bother anymore. This has two user-visible implications: 1. is_too_recursive now assumes that all TyCons are recursive and will bail out in a way that is still mysterious to me if there are too many TyCons. 2. checkRecTc, which is used when stripping newtypes to get to representation, also assumes all TyCons are recursive, and will stop running if we hit the limit. The biggest risk for this patch is that we specialize less than we used to; however, the codeGen tests still seem to be passing. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Reviewers: simonpj, austin, bgamari Subscribers: goldfire, thomie Differential Revision: https://phabricator.haskell.org/D2360
* Remove ufmToListBartosz Nitka2016-06-307-26/+60
| | | | | | | This documents nondeterminism in code generation and removes the nondeterministic ufmToList function. In the future someone will have to use nonDetUFMToList (with proper explanation) or pprUFMWithKeys.
* Reorganize some determinism testsBartosz Nitka2016-06-3015-1/+4
| | | | This directory structure makes it easier to find the tests
* Add a new determinism testBartosz Nitka2016-06-305-0/+46
| | | | This is one of the testcases that I forgot to commit
* Delete Ord UniqueBartosz Nitka2016-06-309-35/+169
| | | | | | | | | | | | | | | | | | | | | | Ord Unique can be a source of invisible, accidental nondeterminism as explained in Note [No Ord for Unique]. This removes it, leaving a note with rationale. It's unfortunate that I had to write Ord instances for codegen data structures by hand, but I believe that it's a right trade-off here. Test Plan: ./validate Reviewers: simonmar, austin, bgamari Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2370 GHC Trac Issues: #4012
* Testsuite: do not depend on sys.stdout.encodingThomas Miedema2016-06-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cause of #12213 is in dump_stdout and dump_stderr: print(read_no_crs(<filename>)) Commit 6f6f515401a29d26eaa5daae308b8e700abd4c04 changed read_no_crs to return a unicode string. Printing a unicode strings works fine as long as sys.stdout.encoding is 'UTF-8'. There are two reasons why sys.stdout.encoding might not be 'UTF-8'. * When output is going to a file, sys.stdout and sys.stdout do not respect the locale: $ LC_ALL=en_US.utf8 python -c 'import sys; print(sys.stderr.encoding)' UTF-8 $ LC_ALL=en_US.utf8 python -c 'import sys; print(sys.stderr.encoding)' 2>/dev/null None * When output is going to the terminal, explicitly reopening sys.stdout has the side-effect of changing sys.stdout.encoding from 'UTF-8' to 'None'. sys.stdout = os.fdopen(sys.__stdout__.fileno(), "w", 0) We currently do this to set a buffersize of 0 (the actual buffersize used is irrelevant for the sys.stdout.encoding problem). Solution: fix dump_stdout and dump_stderr to not use read_no_crs.
* Fix pretty-printer for IfaceCoSimon Peyton Jones2016-06-301-11/+16
| | | | | | | As Trac #12242 showed, there was a missing case in the pretty printer for IfaceCo. I've refactored it so that the pattern-match ovelap checker will spot it next time.
* Testsuite: use ignore_stderr/stdout instead of ignore_outputThomas Miedema2016-06-2941-110/+176
| | | | | | | | | | | | | | | | | The problem with ignore_output is that it hides errors for WAY=ghci. GHCi always returns with exit code 0 (unless it is broken itself). For example: ghci015 must have been failing with compile errors for years, but we didn't notice because all output was ignored. Therefore, replace all uses of ignore_output with either ignore_stderr or ignore_stdout. In some cases I opted for adding the expected output. Update submodule hpc and stm. Reviewed by: simonmar Differential Revision: https://phabricator.haskell.org/D2367
* Double the file descriptor limit for openFile008Bartosz Nitka2016-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | I have get test failures on `openFile008` with `openFile: resource exhausted (Too many open files)` when running inside `./validate`, but not when I run the test individually. I suspect that's because with `./validate` parallelism of 33 threads I go just above the `1024` file descriptor limit. This is probably related to the recent change: `58f0086b70f2: Testsuite: open/close stdin/stdout/stderr explicitly` but I haven't looked deep enough to understand exactly how. I think bumping this is harmless, but I don't really know why it's necessary at all. Test Plan: ./validate Reviewers: austin, thomie, hvr, bgamari, simonmar Reviewed By: simonmar Subscribers: simonmar Differential Revision: https://phabricator.haskell.org/D2368
* Refactor match to not use Unique orderBartosz Nitka2016-06-291-9/+23
| | | | | | | | | | | | | | | | Unique order can introduce nondeterminism. As a step towards removing the Ord Unique instance I've refactored the code to use deterministic sets instead. Test Plan: ./validate Reviewers: simonmar, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2369 GHC Trac Issues: #4012
* Testsuite: fixes for python2.6 supportThomas Miedema2016-06-291-3/+3
|
* Test Trac #12185Simon Peyton Jones2016-06-292-0/+21
|
* Stop the simplifier from removing StaticPtr binds.Facundo Domínguez2016-06-287-26/+65
| | | | | | | | | | | | | | | | | | | | | | | 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
* Wibble error message for #11471Simon Peyton Jones2016-06-281-0/+1
| | | | | | | I'm not quite sure why this changed with my two recent commits, but it /has/ changed (in a benign way) so I'm accepting it. Maybe it wasn't me anyway... but life is short and I'm not inclined to dig further.
* Deal correctly with unused imports for 'coerce'Simon Peyton Jones2016-06-289-68/+102
| | | | | | | | | | | | | | | | | We only do newtype unwrapping for Coercible constraints if the newtype's data constructor is in scope. We were trying to record the fact that the data constructor was thereby 'used', so that an import statement would not be flagged as unnecsssary (by -Wunused-imports). But the code was simply wrong. It was wrong because it assumed that only one level of unwrapping happened, whereas tcTopNormaliseNewTypeTF_maybe actually unwraps multiple layers. So we need to return a /list/ of data constructors that are used. This entailed a bit of refactoring, as usual. Fixes Trac #12067
* Don't omit any evidence bindingsSimon Peyton Jones2016-06-284-28/+37
| | | | | | | | This fixes Trac #12156, where we were omitting to make an evidence binding (because cec_suppress was on), but yet the program was compiled and run. The fix is easy, and involves deleting code :-).