summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* CSE code cleanup and improvementwip/cse-code-desmellingSimon Peyton Jones2016-04-063-119/+207
| | | | | | | | | Triggered by an observation by Joachim, Simon felt the urge to clean up the CSE code a bit. This is the result. (Code by Simon, commit message and other leg-work by Joachim) Differential Revision: https://phabricator.haskell.org/D2074
* Revert "Demand Analyzer: Do not set OneShot information"Joachim Breitner2016-03-313-30/+60
| | | | | | | This reverts commit 28fe0eea4d161b707f67aae26fddaa2e60d8a901 due to various regressions. I’m not sure why my local ./validate --slow run did not catch this, though.
* Revert accidental change to collectTyAndValBindersSimon Peyton Jones2016-03-311-17/+22
| | | | | | | | Richard accidetally introduced this change in his big kind-equality patch. The code is wrong, and potentially could cause binders to be re-ordered. Worth merging to 8.0.
* Demand Analyzer: Do not set OneShot informationJoachim Breitner2016-03-313-60/+30
| | | | | | | | | as suggested in ticket:11770#comment:1. This code was buggy (#11770), and the occurrence analyzer does the same job anyways. This also elaborates the notes in the occurrence analyzer accordingly. Differential Revision: https://phabricator.haskell.org/D2070
* Refactor error generation for pattern synonymsSimon Peyton Jones2016-03-317-157/+178
| | | | | | The result of a series of patches on type-error messages for pattern synonyms had become a bit baroque. This tidies it up a bit. Still not fantastic, but better.
* Make SigSkol take TcType not ExpTypeSimon Peyton Jones2016-03-316-17/+11
| | | | | | | | | For some reason a SigSkol had an ExpType in it, and there were lots of places where we needed it to have a TcType. And was indeed always a Check. All a lot of fuss about nothing. Delete code, fewer failure points, types are more precise. All good.
* Small refactor of TcMType.tauifyExpTypeSimon Peyton Jones2016-03-311-4/+8
| | | | | Mainly to make it clearer that tauifyExpType is a no-op on (Check ty)
* Refactor in TcMatchesSimon Peyton Jones2016-03-3111-48/+39
| | | | | | | | | | * Move the several calls of tauifyMultipleMatches into tcMatches, so that it can be called only once, and the invariants are clearer * I discovered in doing this that HsLamCase had a redundant and tiresome argument, so I removed it. That in turn allowed some modest but nice code simplification
* Comments onlySimon Peyton Jones2016-03-311-2/+4
|
* Minor refactoring in mkExportSimon Peyton Jones2016-03-311-13/+15
| | | | No change in behaviour
* Comments onlySimon Peyton Jones2016-03-312-10/+8
|
* Kill the magic of AnyBen Gamari2016-03-309-139/+123
| | | | | | | | | | | | | | | | | | | | This turns `Any` into a standard wired-in type family defined in `GHC.Types`, instead its current incarnation as a magical creature provided by the `GHC.Prim`. Also kill `AnyK`. See #10886. Test Plan: Validate Reviewers: simonpj, goldfire, austin, hvr Reviewed By: simonpj Subscribers: goldfire, thomie Differential Revision: https://phabricator.haskell.org/D2049 GHC Trac Issues: #10886
* Add -f(no-)version-macro to explicitly control macros.Edward Z. Yang2016-03-306-2/+13
| | | | | | | | | | | | | | Test Plan: validate Reviewers: thomie, austin, bgamari Reviewed By: bgamari Subscribers: hvr Differential Revision: https://phabricator.haskell.org/D2058 GHC Trac Issues: #11763
* Don't require -hide-all-packages for MIN_VERSION_* macrosThomas Miedema2016-03-306-25/+13
| | | | | | | | | | | | | | | | | Define MIN_VERSION_pkgname and VERSION_pkgname macros for all exposed packages, without requiring -hide-all-packages. See #10970 comment 7-10 for discussion. Reviewers: duncan, ezyang, bgamari, austin Reviewed By: ezyang Subscribers: hvr, rwbarton Differential Revision: https://phabricator.haskell.org/D1869 GHC Trac Issues: #10970
* ghc-prim: Mark unpackCStringUtf8# and unpackNBytes# as NOINLINEBen Gamari2016-03-301-5/+33
| | | | | | | | | | | | | | | There is no benefit to be had from inlining this function and it may defeat rewrite rules if inlined early. See #11772.. Test Plan: Validate, nofib Reviewers: simonpj, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2057 GHC Trac Issues: #11772
* Defer inlining of Ord methodsBen Gamari2016-03-303-31/+207
| | | | | | This performs the same refactoring performed in D1980 for Eq on Ord, rewriting the class operations in terms of monomorphic helpers than can be reliably matched in rewrite rules.
* ghc-prim: Delay inlining of {gt,ge,lt,le}Int to phase 1Ben Gamari2016-03-303-10/+17
| | | | Otherwise rewrite rules may not get an opporunity to fire.
* rts/posix/Itimer.c: Handle EINTR when reading timerfdErik de Castro Lopo2016-03-311-4/+9
| | | | | | | | | | | | | | | Commit 8626d76a72 added checking of the return value when reading from the `timer_fd` and calling `sysErrorBelch` to print a warning message. However some error causes (like EINTR) are benign and should just be ignored. Test Plan: validate Reviewers: hvr, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2040
* Comments only in Unify.hsSimon Peyton Jones2016-03-301-69/+81
| | | | | To clarify what the "pure unifier" does, compared to the "impure unifiers" in the type checker.
* Do not claim that -O2 does not do better than -OJoachim Breitner2016-03-301-3/+0
| | | | | | | | | | | | when in fact it does. This was pointed out by Johannes Bechberger and supported with seemingly statistically sound evidence in his Bachelor thesis: Of the benchmark shootout programs, 80% benefit significantly by switchtng from -O to -O2. See https://uqudy.serpens.uberspace.de/blog/2016/02/08/ghc-performance-over-time/ for a few raw numbers. Differential Revision: https://phabricator.haskell.org/D2065
* Don't recompute some free vars in lintCoercionBartosz Nitka2016-03-303-12/+12
| | | | | | | | | | | | | | | | | | | | | | As pointed out by @simonpj on D2044 we don't need to compute the free vars of the range of the substitution as most of them are already carried by the monad. This should be a tiny performance improvement over the version from before D2044. Also removes an extra function that is now unnecessary. Test Plan: ./validate && ./validate --slow Reviewers: goldfire, simonpj, austin, bgamari Reviewed By: simonpj Subscribers: thomie, simonmar, simonpj Differential Revision: https://phabricator.haskell.org/D2060 GHC Trac Issues: #11371
* Typos in non-codeGabor Greif2016-03-3017-18/+18
|
* Add testcase for #11770Joachim Breitner2016-03-307-23/+119
| | | | | and use normalise_errmsg_fun to check the core output in all.T, instead relying on code in the Makefile.
* base: Fix haddock typoBen Gamari2016-03-291-1/+1
|
* users-guide/rel-notes: Note broken-ness of ImpredicativeTypesBen Gamari2016-03-291-0/+8
|
* rename: Disallow type signatures in patterns in plain HaskellBen Gamari2016-03-294-1/+35
| | | | | | | | | | | | | | | | | | | | This should require -XScopedTypeVariables. It seems this was previously handled by RnTypes.rnHsBndrSig which called RnTypes.badKindSigErr but this was broken in Simon's refactor of wildcards, 1e041b7382b6aa329e4ad9625439f811e0f27232. Here we re-introduce a check in RnPat. See #11663. Test Plan: Validate with `T11663` Reviewers: austin, simonpj Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2054 GHC Trac Issues: #11663
* Tes suite output updatesJoachim Breitner2016-03-292-24/+25
|
* Do not print DmdType in Core outputJoachim Breitner2016-03-2920-103/+99
| | | | too verbose, and usualy preceded by Str= anyways.
* Rename isNopSig to isTopSigJoachim Breitner2016-03-295-11/+12
| | | | | to be consistent with the other uses of nop vs. top in Demand.hs. Also, stop prettyprinting top strictness signatures in Core dumps.
* SpecConstr: Transport strictness data to specialization’s argument’s bindersJoachim Breitner2016-03-291-1/+25
| | | | This is a result of the discussion in ticket:11731#comment:9.
* Typo in Note nameJoachim Breitner2016-03-291-2/+2
|
* Ticky: Do not count every entry twiceJoachim Breitner2016-03-291-2/+1
| | | | | (likely introduced by 99d4e5b4a0bd32813ff8c74e91d2dcf6b3555176, possibly due to a merge mistake).
* Be more explicit about closure types in ticky-ticky-reportJoachim Breitner2016-03-293-45/+88
| | | | | | | | | | The report now distinguishes thunks (in the variants single-entry and standard thunks), constructors and functions (possibly single-entry). Forthermore, for standard thunks (AP and selector), do not count an entry when they are allocated. It is not possible to count their entries, as their code is shared, but better count nothing than count the wrong thing.
* Remove all mentions of IND_OLDGEN outside of docs/rtsJoachim Breitner2016-03-292-3/+2
|
* cleanup POSIX/XOPEN defines for switch to C99Karel Gardas2016-03-291-16/+12
| | | | | | | | | | | | | | | | | | | | Summary: This patch cleans up various POSIX and XOPEN defines. We aim to switch to C99 solely and for this the lowest version of supported POSIX/XOPEN is: _XOPEN_SOURCE 600 _POSIX_C_SOURCE 200112L Test Plan: tested on Solaris 11 and OpenBSD 5.9. Should be good also on Solaris 10, FreeBSD and DragonFlyBSD. We need to test on Mac OS X, Linux and MinGW Reviewers: austin, bgamari, erikd, hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2056
* base: Add comment noting import loopBen Gamari2016-03-291-0/+2
|
* Add Data.Functor.Classes instances for Proxy (trac issue #11756)Andrew Martin2016-03-292-0/+21
| | | | | | | | | | | | | | Test Plan: currently no test plan Reviewers: hvr, RyanGlScott, bgamari, austin Reviewed By: RyanGlScott, bgamari, austin Subscribers: thomie, RyanGlScott, andrewthad Differential Revision: https://phabricator.haskell.org/D2051 GHC Trac Issues: #11756
* Use the correct substitution in lintCoercionBartosz Nitka2016-03-293-1/+12
| | | | | | | | | | | | | | | | | We need the free vars of `t2` to satisfy the substitution invariant. Luckily they are in the in-scope carried around. Test Plan: ./validate Reviewers: bgamari, austin, goldfire, simonpj Reviewed By: simonpj Subscribers: thomie, simonmar Differential Revision: https://phabricator.haskell.org/D2044 GHC Trac Issues: #11371
* Build correct substitution in instDFunTypeBartosz Nitka2016-03-291-2/+4
| | | | | | | | | | | | | | | | | | | We will use `ty` in the range of the substitution, hence the substitution needs `ty`'s free vars in-scope. They don't seem easily available by other means, so we just compute them. Test Plan: ./validate Reviewers: austin, goldfire, bgamari, simonpj Reviewed By: simonpj Subscribers: thomie, simonmar Differential Revision: https://phabricator.haskell.org/D2043 GHC Trac Issues: #11371
* Use a correct substitution in tcInstTypeBartosz Nitka2016-03-291-1/+1
| | | | | | | | | | | | | | | | | | `ty` doesn't have to be a closed type, so we need to add its free vars to the in-scope set. They don't seem to be available anywhere nearby, so we have to compute them. Test Plan: ./validate Reviewers: goldfire, austin, bgamari, simonpj Reviewed By: simonpj Subscribers: thomie, simonmar Differential Revision: https://phabricator.haskell.org/D2042 GHC Trac Issues: #11371
* users-guide: Add references to various issues in bugs sectionBen Gamari2016-03-291-0/+37
| | | | | | | | | | | | | | Test Plan: Read it Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2052 GHC Trac Issues: #7411, #11197, #11554, #11715
* users-guide: WibblesBen Gamari2016-03-291-6/+34
|
* users-guide: Provide more depth in table-of-contentsBen Gamari2016-03-291-1/+1
| | | | Per Simon's request.
* base: Document caveats about Control.Concurrent.ChanErik de Castro Lopo2016-03-291-0/+5
| | | | | | | | | | | | | | | These are implemented using `MVars` which have known caveats. Suggest the use of `TChan` from the stm library instead. Test Plan: n/a Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2047
* Reenable external-json lintersBen Gamari2016-03-292-1/+14
| | | | | | | | | | | | | | | | | | | | This is to be merged once a fix for the Harbormaster build script has been applied. This reverts commit a14296c2660521db8ba965065687e45cee4e3401. These were previously disabled due to Harbormaster validation failures. Also, apply CPP check to .c and .h files in addition to Haskell sources. Test Plan: Let Harbormaster validate Reviewers: austin Reviewed By: austin Subscribers: hvr, thomie Differential Revision: https://phabricator.haskell.org/D1580
* fix compilation failure on Solaris 11Karel Gardas2016-03-291-1/+1
| | | | | | | | | | | | | Summary: Solaris is quite picky about C and POSIX version combination. For recent change to C99 we need to switch _XPG6 on which means _XOPEN_SOURCE should be defined to 600 Reviewers: austin, bgamari, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2053
* Remove obsolete --with-hc flag from ./configureHerbert Valerio Riedel2016-03-281-9/+0
| | | | | This was probably missed during the big build-system refactoring in 34cc75e1a62638f2833815746ebce0a9114dc26b
* Update bytestring submodule to latest snapshotHerbert Valerio Riedel2016-03-281-0/+0
| | | | | | | | | Most notably, this pulls in the following changes > Fix breakByte and spanByte rewrite rules > Implement `stripPrefix`/`stripSuffix` The first patch is related to #11688
* Do not test for existence of the executableKai Harries2016-03-284-4/+4
| | | | | | | | | | | | | | | | | Summary: The test for the existence of the executable breaks on MS Windows. It is furthermore needless, because if the test can be executed the executable is obviously there. Reviewers: austin, bgamari, Phyx Reviewed By: Phyx Subscribers: Phyx, thomie Differential Revision: https://phabricator.haskell.org/D2050 GHC Trac Issues: #4114
* Autoconf: detect and set CFLAGS/CPPFLAGS needed for C99 modeHerbert Valerio Riedel2016-03-284-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first phase of addressing #11757 which aims to make C99 support a base-line requirement for GHC and clean up the code-base to use C99 facilities when sensible. This patch exploits the logic/heuristic used by `AC_PROG_CC_C99` to determine the flags needed in case the C compiler isn't able to compile C99 code in its current mode. We can't use `AC_PROG_CC_C99` directly though because GHC's build-system expects CC to contain a filename without any flags, while `AC_PROG_CC_C99` would e.g. result in `CC="gcc -std=gnu99"`. Morever, we support different `CC`s for stage0/1/2, so we need a version of `AC_PROG_CC_C99` for which we can specify the `CC`/`CFLAGS` variables to operate on. This is what `FP_SET_CFLAGS_C99` does. Note that Clang has been defaulting to C99+ for a long time, while GCC 5 defaults to C99+ as well. So this has mostly an affect on older GCCs versions prior to 5.0 and possibly compilers other than GCC/Clang (which are not officially supported for building GHC anyway). Reviewers: kgardas, erikd, bgamari, austin Reviewed By: erikd Differential Revision: https://phabricator.haskell.org/D2045