summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Provide a faster implementation for the Read Integer instanceMarios Titas2015-02-231-20/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The current implementation of the Read Integer instance has quadratic complexity and thus performs badly on large inputs. This patch provides a rather simple sub-quadratic algorithm. For small inputs, we use the old algorithm (there is a small penalty for that). The gains for large inputs can be dramatic: on my system, the time to perform read (take 1000000 $ cycle "1234567890") :: Integer drops from 65 seconds to less than a second. Note that we already provide an ad-hoc instance for Show Integer, so this patch essentially does the same thing for Read Integer. Test Plan: Check that read :: String -> Integer returns correct results for inputs of various sizes. Reviewers: austin, hvr Reviewed By: austin, hvr Subscribers: ekmett, thomie Differential Revision: https://phabricator.haskell.org/D645 GHC Trac Issues: #10067
* base: Fix (**) implementation for Data.ComplexAlexander2015-02-231-0/+16
| | | | | | See the extensive discussion in #8539. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Fix build bogons due to missing separatorAustin Seipp2015-02-231-1/+1
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* base: fix broken link (#10088)Austin Seipp2015-02-231-2/+2
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* docs: Flatten MAKEHELP/SUBMAKEHELPAustin Seipp2015-02-234-83/+82
| | | | | | | There's no reason to have two files, and this is one step towards a cleaner root directory. Signed-off-by: Austin Seipp <austin@well-typed.com>
* docs: add INSTALL.md to root dir (#9926)Austin Seipp2015-02-232-2/+42
| | | | | | | This gives a very quick rundown on installation for end-users (HACKING etc is for developers/possible contributors). Signed-off-by: Austin Seipp <austin@well-typed.com>
* Show '#' on unboxed literalsThomas Miedema2015-02-239-24/+55
| | | | | | | | | | | | | | Test Plan: deriving/should_run/T10104 Reviewers: austin, jstolarek Reviewed By: austin, jstolarek Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D672 GHC Trac Issues: #10104
* rts/linker: ignore unknown PE sectionsTamar Christina2015-02-231-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently the linker tries to see if it understands/knows every section in the PE file before it continues. If it encounters a section it doesn't know about it errors out. Every time there's a change in MinGW compiler that adds a new section to the PE file this will break the ghc linker. The new sections don't need to be understood by `ghc` to continue so instead of erroring out the section is just ignored. When running with `-debug` the sections that are ignored will be printed. Test Plan: See the file `ghcilinkerbug.zip` in #9907. 1) unzip file content. 2) open examplecpp.cabal and change base <4.8 to <4.9. 3) execute cabal file with cabal repl. Applying the patch makes `cabal repl` in step 3) work. Note that the file will fail on a `___mingw_vprintf` not being found. This is because of the `cc-options` specifying `-std=c++0x`, which will also require `libmingwex.a` to be linked in but wasn't specified in the cabal file. To fix this, remove the `cc-options` which defaults to c99. Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D671 GHC Trac Issues: #9907, #7103, #10051, #7056, #8546
* Declare some Makefile targets to be PHONYThomas Miedema2015-02-236-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Given: a Makefile with a non-PHONY target called `target` If: after running `make target`, a file exists with the same name as `target` (it was either already there, or it was created by running `make target`) And: `target` has no dependencies, such as `clean`, that modify or delete that file Then: subsequent invocations of `make target` will not have any effect. Solution: make `target` PHONY. BAD: ``` foo: ... ./foo ``` BETTER: ``` foo: ... ./foo .PHONY: foo ``` Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D670
* Always ignore user-package-db when running testsThomas Miedema2015-02-231-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: The user package database was already ignored for systems that `have_subprocess`. To [wiki:Debugging/InstallingPackagesInplace install] a package inplace: `cabal install --with-compiler=<inplace-ghc> --with-package-db=<inplace-package-db>` <package> Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D668
* Fix for ticket #10078: ensure that tcPluginStop is called even in case of ↵Jan Bracker2015-02-231-2/+7
| | | | | | | | | | | | | | | | | | | | | type errors Summary: Remove unused variable that appeared through the fix for ticket #10078 Merge branch 'master' of git://git.haskell.org/ghc Added comment with bug ID. Reviewers: adamgundry, gridaphobe, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D667 GHC Trac Issues: #10078
* Make top-level "configure" accept and propagate ↵PHO2015-02-234-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | --with-curses-{includes,libraries} to libraries Summary: If curses is installed into some non-standard path, we currently have to say something like the following in mk/build.mk: libraries/terminfo_CONFIGURE_OPTS += \ --configure-option=--with-curses-includes=/somewhere/include \ --configure-option=--with-curses-libraries=/somewhere/lib This is because the top-level configure does not accept nor propagate --with-curses-{includes,libraries} to libraries while it does so for iconv, gmp and libffi. It would be nice if curses were handled in the same manner. Test Plan: Install curses into some non-standard path. Then run the top-level "configure" script with options "--with-curses-includes=/path/to/curses/include" and "--with-curses-libraries=/path/to/curses/lib". Reviewers: austin Reviewed By: austin Subscribers: thomie, PHO Differential Revision: https://phabricator.haskell.org/D665 GHC Trac Issues: #10096
* Error out on `Main` without `main` in GHCi (#7765)Thomas Miedema2015-02-2318-64/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: GHC does 2 validation checks for module `Main`: * does `main` exist * is `main` exported (#414) The second check is done in ghc as well as in ghci (and runghc and ghc -e). The first check however is currently not done in ghci, to prevent "'main' is not in scope" errors when loading simple scripts. See commit d28ba8c8009 for more information. This commit tightens the special case for ghci. When the file does not contain a main function, but does contain an explicit module header (i.e. "module Main where"), then /do/ raise an error in ghci (and runghc and ghc -e) as well Test Plan: module/T7765: a module Main with an explicit module header but without a main function should be an error for all Ways. Additionaly: delete test module/mod174. It was added in commit 5a54c38, but it is a duplicate of module/T414. Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D649 GHC Trac Issues: #7765
* fix bus errors on SPARC caused by unalignment access to alloc_limit (fixes ↵Karel Gardas2015-02-234-8/+17
| | | | | | | | | | #10043) Reviewers: austin, simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D657
* {Data,Generic(1),MonadZip} instances for IdentityHerbert Valerio Riedel2015-02-221-2/+9
| | | | | | | | | These instances were missed when the identity functor was added to the `base` package (re #9664). Reviewed By: ekmett Differential Revision: https://phabricator.haskell.org/D674
* Unbreak travis by installing llvm-3.6Joachim Breitner2015-02-211-3/+5
|
* [ci skip] comment typoJoachim Breitner2015-02-211-1/+1
|
* Comments onlySimon Peyton Jones2015-02-201-1/+3
|
* Comments onlySimon Peyton Jones2015-02-201-1/+1
|
* Comments onlySimon Peyton Jones2015-02-202-34/+57
|
* Add a bizarre corner-case to cgExpr (Trac #9964)Simon Peyton Jones2015-02-203-23/+67
| | | | | | | | | | | David Feuer managed to tickle a corner case in the code generator. See Note [Scrutinising VoidRep] in StgCmmExpr. I rejigged the comments in that area of the code generator Note [Dodgy unsafeCoerce 1] Note [Dodgy unsafeCoerce 2] but I can't say I fully understand them, alas.
* Don't report instance constraints with fundeps as redundantSimon Peyton Jones2015-02-206-24/+68
| | | | | | | More subtlety due to functional dependencies. Note [Redundant constraints in instance decls] in TcErrors. Fixes Trac #10100.
* fix T7600 run on bigendian platformKarel Gardas2015-02-191-0/+2
|
* Comments onlySimon Peyton Jones2015-02-192-17/+22
|
* Fix #10045Thomas Winant2015-02-187-41/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: SPJ's solution is to only bring the `TcId` (which includes the type) of a binder into scope when it had a non-partial type signature. Take care of this by only storing the `TcId` in `TcSigInfo` of non-partial type signatures, hence the change to `sig_poly_id :: Maybe TcId`. Only in case of a `Just` will we bring the `TcId` in scope. We still need to know the name of the binder, even when it has a partial type signature, so add a `sig_name :: Name` field. The field `sig_partial :: Bool` is no longer necessary, so reimplement `isPartialSig` in terms of `sig_poly_id`. Note that the new test case fails, but not because of a panic, but because the `Num a` constraint is missing. Adding an extra-constraints wildcard to `copy`'s signature would fix it. Test Plan: validate Reviewers: simonpj, austin Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D646 GHC Trac Issues: #10045
* Typo in function nameGabor Greif2015-02-181-3/+3
|
* Cleanup ghc-pkgThomas Miedema2015-02-181-112/+37
| | | | | | | | | | | | | | | | | | | | Summary: * Delete dead code in ghc-pkg (not_yet ready since 2004) * remove --auto-ghc-libs Commit 78185538b (2011) mentions: "Deprecate the ghc-pkg --auto-ghci-libs flag It was never a universal solution. It only worked with the GNU linker. It has not been used by Cabal for ages. GHCi can now load .a files so it will not be needed in future." "Warning: --auto-ghci-libs is deprecated and will be removed in GHC 7.4" Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D666
* runghc: be explicit about ghc version (#9054)Thomas Miedema2015-02-184-9/+15
| | | | | | | | | | | | | | Summary: runghc-7.x should always call ghc-7.x Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D664 GHC Trac Issues: #9054
* Do not clobber CPPFLAGS nor LDFLAGS, fixes #10093PHO2015-02-181-3/+6
| | | | | | | | | | | | | | | | Summary: Append -I/-L flags to CPPFLAGS/LDFLAGS instead of clobbering. Test Plan: Install libiconv into /some/non-standard/path. Set CONF_GCC_LINKER_OPTS_STAGE{0,1,2} to -Wl,-rpath,/some/non-standard/path/lib. And then run ./configure with arguments --with-iconv-includes=/some/non-standard/path/include and --with-iconv-libraries=/some/non-standard/path/lib Reviewers: hvr, austin Reviewed By: austin Subscribers: thomie, PHO Differential Revision: https://phabricator.haskell.org/D663 GHC Trac Issues: #10093
* Revert "Eta-expand argument to foldr in mapM_ for []"Austin Seipp2015-02-181-2/+1
| | | | | | | This change lacked justification (or a test!) for its improvements, and I merged it on a sweep of Phabricator without fixing this. Trac #10034. This reverts commit 7cf87fc6928f0252d9f61719e2344e6c69237079.
* Add configurable verbosity level to hpcYuras Shumovich2015-02-177-3/+32
| | | | | | | | | | | | | | | | | | | Summary: All commands now have `--verbosity` flag, so one can configure cabal package with `--hpc-options="--verbosity=0"`. Right now it is used only in `hpc markup` to supress unnecessary output. Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D660 GHC Trac Issues: #10091
* Delete vestigial external core code (#9402)Thomas Miedema2015-02-173-125/+1
| | | | | | | | | | | | | | Test Plan: harbormaster Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D659 GHC Trac Issues: #9402
* Improve outdated ghc-pkg cache warning (#9606)Thomas Miedema2015-02-171-2/+8
| | | | | | | | | | | | | | | | Summary: No more frustration. Test Plan: I tested it. Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D658 GHC Trac Issues: #9606
* Don't truncate traceEvents to 512 bytes (#8309)Thomas Miedema2015-02-174-36/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Don't call postLogMsg to post a user msg, because it truncates messages to 512 bytes. Rename traceCap_stderr and trace_stderr to vtraceCap_stderr and trace_stderr, to signal that they take a va_list (similar to vdebugBelch vs debugBelch). See #3874 for the original reason behind traceFormatUserMsg. See the commit msg in #9395 (d360d440) for a discussion about using null-terminated strings vs strings with an explicit length. Test Plan: Run `cabal install ghc-events` and inspect the result of `ghc-events show` on an eventlog file created with `ghc -eventlog Test.hs` and `./Test +RTS -l`, where Test.hs contains: ``` import Debug.Trace main = traceEvent (replicate 510 'a' ++ "bcd") $ return () ``` Depends on D655. Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D656 GHC Trac Issues: #8309
* Add missing va_end to va_startThomas Miedema2015-02-171-0/+2
| | | | | | | | | | | | Summary: See also ab9711d8. Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D655
* Remove RAWCPP_FLAGS (Task #9094)Thomas Miedema2015-02-176-27/+26
| | | | | | | | | | | | Reviewers: carter, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D648 GHC Trac Issues: #9094
* Fix typo in error messageGabor Greif2015-02-171-1/+1
|
* Move comments about evaluating the message to the top of the moduleSimon Peyton Jones2015-02-151-5/+5
| | | | The remarks apply equally to all the functions here (Trac #9795)
* Improve typechecking of RULEs, to account for type wildcard holesSimon Peyton Jones2015-02-155-3/+23
| | | | | | This fixes Trac #10072. Previously the type-hole constraint was escaping to top level, but it belongs in the scope of the skolems bound by the RULE.
* Comments onlySimon Peyton Jones2015-02-151-1/+2
|
* Improve documentation of 'trace'Simon Peyton Jones2015-02-131-0/+4
| | | | See Trac #9795.
* Refactor decideQuantificationSimon Peyton Jones2015-02-134-105/+144
| | | | | | | | | | | | | | | | | | | | Richard was interrogating me about decideQuantification yesterday. I got a bit stuck on the promote_tvs part. This refactoring * simplifes the API of decideQuantification * move mkMinimalBySCs into decideQuantification (a better place for it) * moves promotion out of decideQuantification (where it didn't really fit), and comments much more fully what is going on with the promtion stuff * comments decideQuantification more fully * coments the EqPred case of quantifyPred more fully It turned out that the theta returned by decideQuantification, and hence by simplifyInfer, is now fully zonked, so I could remove a zonking in TcBinds.
* Tiny refactoring; no change in behaviourSimon Peyton Jones2015-02-121-11/+12
|
* Comments and white space; plus structurally avoiding the previously ↵Simon Peyton Jones2015-02-121-10/+16
| | | | "egregious bug"
* Propagate ReturnTvs in matchExpectedFunTysRichard Eisenberg2015-02-114-18/+33
| | | | | | | This really should have done a while ago, with the ReturnTv factoring. It's surprising that I can't tickle the bug! Please merge to ghc-7.10.
* Fix egregious typo in checkTauTvUpdate.Richard Eisenberg2015-02-111-1/+1
| | | | | | | The old code used an unzonked type in an occurs-check, which would sometimes lead to an infinite loop. Please merge to ghc-7.10.
* Fix #10079 by recurring after flattening exposes a TyConApp.Richard Eisenberg2015-02-113-2/+32
| | | | | | | | | Previously, try_decompose_nom_app was smart enough to recur if flattening exposed a TyConApp, but try_decompose_repr_app was not. Now, if neither type in try_decompose_repr_app is an AppTy, recur. Seems all straightforward enough to avoid a Note.
* nameIsLocalOrFrom should include interactive modulesSimon Peyton Jones2015-02-118-24/+57
| | | | | | | | | The provoking cause was Trac #10019, but it revealed that nameIsLocalOrFrom should really include all interactive modules (ones from the 'interactive' package). Previously we had some ad-hoc 'isInteractiveModule' tests with some (but not all) the calls to nameIsLocalOrFrom. See the new comments with Name.nameIsLocalOrFrom.
* Do not share T9878.hs between test T9878 and T9878bSimon Peyton Jones2015-02-113-2/+8
| | | | | | I think the sharing was giving a race condition in the test suite; I got a failure from validate which went away when I ran the tests individually.
* Do not complain about missing fields in Trac #10047Simon Peyton Jones2015-02-101-0/+1
|