summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* utils: detabify/dewhitespace BufWriteAustin Seipp2014-08-201-42/+35
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* simplCore: detabify/dewhitespace SATAustin Seipp2014-08-201-62/+54
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* stranal: detabify/dewhitespace WorkWrapAustin Seipp2014-08-201-85/+78
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* coreSyn: detabify/dewhitespace TrieMapAustin Seipp2014-08-201-83/+76
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Comments fix to Trac #9140Simon Peyton Jones2014-08-201-0/+4
|
* Make sure that a prototype is included for 'setIOManagerControlFd'Gabor Greif2014-08-201-0/+1
|
* Fix prepositions in the documentation of -rdynamic.Facundo Domínguez2014-08-202-4/+4
|
* validate: add simple CPU count autodetectionSergei Trofimovich2014-08-191-5/+27
| | | | | | | | | | | | | | Summary: Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Test Plan: ran ./validate on linux Reviewers: austin Reviewed By: austin Subscribers: phaskell, simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D146
* rts/base: Fix #9423Andreas Voellmy2014-08-199-51/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fix #9423. The problem in #9423 is caused when code invoked by `hs_exit()` waits on all foreign calls to return, but some IO managers are in `safe` foreign calls and do not return. The previous design signaled to the timer manager (via its control pipe) that it should "die" and when the timer manager returned to Haskell-land, the Haskell code in timer manager then signalled to the IO manager threads that they should return from foreign calls and `die`. Unfortunately, in the shutdown sequence the timer manager is unable to return to Haskell-land fast enough and so the code that signals to the IO manager threads (via their control pipes) is never executed and the IO manager threads remain out in the foreign calls. This patch solves this problem by having the RTS signal to all the IO manager threads (via their control pipes; and in addition to signalling to the timer manager thread) that they should shutdown (in `ioManagerDie()` in `rts/Signals.c`. To do this, we arrange for each IO manager thread to register its control pipe with the RTS (in `GHC.Thread.startIOManagerThread`). In addition, `GHC.Thread.startTimerManagerThread` registers its control pipe. These are registered via C functions `setTimerManagerControlFd` (in `rts/Signals.c`) and `setIOManagerControlFd` (in `rts/Capability.c`). The IO manager control pipe file descriptors are stored in a new field of the `Capability_ struct`. Test Plan: See the notes on #9423 to recreate the problem and to verify that it no longer occurs with the fix. Auditors: simonmar Reviewers: simonmar, edsko, ezyang, austin Reviewed By: austin Subscribers: phaskell, simonmar, ezyang, carter, relrod Differential Revision: https://phabricator.haskell.org/D129 GHC Trac Issues: #9423, #9284
* travis: Use hvr’s multi-ghc-PPAJoachim Breitner2014-08-191-5/+8
|
* Check if file is present instead of directoryThomas Miedema2014-08-191-1/+1
| | | | | | | | | | | | | | | | Fixes #8886. Problem: any `sync-all` command that is run before the first succesfull `sync-all get` would trigger a false warning about an old `time` package being present. Cause: after cloning the ghc repository, the (empty) `libraries/time` directory is already present. Solution: check if the directory actually contains any of the `time` files. I picked the `LICENSE` file, since `boot` does so as well. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Correct checkStrictBinds for generalised typearchblob2014-08-194-2/+22
| | | | | | | | See Trac #9140. Auditors: simonpj Signed-off-by: Austin Seipp <austin@well-typed.com>
* Add test case for #9046Vitaly Bragilevsky2014-08-193-0/+5
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* build: require GHC 7.6 for bootstrappingAustin Seipp2014-08-195-44/+4
| | | | | | | | | | | | | | | | | | | | | | Summary: Per the usual standards, a build of GHC is only compileable by the last two releases (e.g. 7.8 only by 7.4 and 7.6). To make sure we don't get suckered into supporting older compilers, let's remove this support now. Signed-off-by: Austin Seipp <austin@well-typed.com> Test Plan: Try to bootstrap with GHC 7.4, watch it fail. Bootstrap with 7.6 or better, and everything works. Reviewers: hvr Reviewed By: hvr Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D167
* Mention that `Data.Ix` uses row-major indexingAlexander Berntsen2014-08-191-1/+1
| | | | | | | This addresses Trac #8712 by simply mentioning row-major indexing, thereby removing any ambiguity. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Explain how to clone GitHub forks. Ticket #8379.Thomas Miedema2014-08-191-7/+9
| | | | | | | This information is mirrored at: http://ghc.haskell.org/trac/ghc/wiki/Building/GettingTheSources#GettingaGHCrepositoryfromGitHub Signed-off-by: Austin Seipp <austin@well-typed.com>
* Use absolute links to Cabal docs from the GHC users guide (#9154)Bob Ippolito2014-08-191-2/+2
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* includes/stg/Prim.h: add matching 'hs_atomic_*' prototypesSergei Trofimovich2014-08-191-0/+38
| | | | | | Fixes implicit function declarations in C codegen. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* This note's name has been fixedGabor Greif2014-08-191-1/+1
|
* Have the RTS linker search symbols in the originating windows binary.Facundo Domínguez2014-08-182-9/+15
| | | | | | | | | | | | | | | | Summary: In initLinker, this patch adds the handle of the module corresponding to the program binary to the list of DLL handles that lookupSymbol uses to search for symbols. Test Plan: validate Reviewers: simonmar, austin Reviewed By: simonmar, austin Subscribers: phaskell, simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D103 GHC Trac Issues: #9382
* Implement -rdynamic in Linux and Windows/MinGW32.Facundo Domínguez2014-08-186-1/+79
| | | | | | | | | | | | | | | | | | Summary: In Linux, it is a synonym for -optl -rdynamic. In Windows, it is a synonym for -optl -export-all-symbols. Test Plan: validate Reviewers: simonmar, austin Reviewed By: simonmar, austin Subscribers: mboes, phaskell, simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D102 GHC Trac Issues: #9381
* UNREG: fix PackageKey emission into .hc filesSergei Trofimovich2014-08-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixes ./configure --unable-unregisterised build failure: HC [stage 1] (one of the first calls) ... <command line>: unknown package: transformers-0.4.1.0 The reason of bug is how UNREG build stores package information in .hc files: compiler/main/CodeOutput.lhs generates first line as /* GHC_PACKAGES pkg-name-ver1 pkg-name-ver2 ... while DriverPipeline.hs (getHCFilePackages) expects /* GHC_PACKAGES pkg-key1 pkg-key2 ... Fix it by emitting ghc's PackageKey in CodeOutput Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Test Plan: build-tested on ./configure --enable-unregistersied Reviewers: simonmar, ezyang, austin Reviewed By: ezyang, austin Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D164
* Bug #9439: Ensure that stage 0 compiler isn't affectedBen Gamari2014-08-183-0/+60
| | | | | | | | | | | | | | | | Summary: Bug #9439 will cause miscompilation of GHC's LLVM backend. Here we ensure that an affected compiler isn't used to bootstrap. Test Plan: Attempt to bootstrap GHC with an affected stage 0 compiler. Reviewers: rwbarton, austin Reviewed By: austin Subscribers: simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D159
* Make Prelude.signum handle -0.0 correctly (#7858)Alexander Berntsen2014-08-182-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Make the `Float` and `Double` implementations of `signum` handle -0.0 correctly per IEEE-754. This, together with "Make Prelude.abs handle -0.0 correctly (#7858)", fixes Trac #7858. Depends on D145 Signed-off-by: Alexander Berntsen <alexander@plaimi.net> Test Plan: signum of (-0.0) should be (-0.0) not 0.0. Test program: main = putStrLn $ p ++ " " ++ n where f = show . signum p = f (-0.0 :: Double) n = f (0.0 :: Double) Reviewers: ekmett, hvr, rwbarton, austin Reviewed By: austin Subscribers: phaskell, simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D148 GHC Trac Issues: #7858
* Make Prelude.abs handle -0.0 correctly (#7858)Alexander Berntsen2014-08-182-4/+8
| | | | | | | | | | | | | | | | | | | | | | | Summary: Make the `Float` and `Double` implementations of `abs` handle -0.0 correctly per IEEE-754. abs (-0.0::Float) and abs (-0.0::Double) previously returned -0.0, when they should return 0.0. This patch fixes this. Signed-off-by: Alexander Berntsen <alexander@plaimi.net> Test Plan: abs (-0.0::Double) should = 0.0 instead of (-0.0) Reviewers: ekmett, hvr, austin, rwbarton Reviewed By: austin, rwbarton Subscribers: phaskell, trofi, simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D145 GHC Trac Issues: #7858
* testsuite/T9379: Use GHC.Conc instead of Control.Concurrent.STMBen Gamari2014-08-181-1/+3
| | | | | | | | | | | | | | | | | | Summary: `GHC.Conc` provides almost everything we need. Signed-off-by: Ben Gamari <bgamari.foss@gmail.com> Test Plan: make test TEST=T9379 Reviewers: austin, simonmar Reviewed By: austin, simonmar Subscribers: phaskell, simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D152
* Fix three problems with occurrence analysis on case alternatives.Andrew Farmer2014-08-181-21/+32
| | | | | | | | | | | | | | | | | | | | | Summary: 1. Respect condition (a) in Note [Binder swap] 2. Respect condition (b) in Note [Binder swap] 3. Return usage of any coercion variables in binder swap Fixes T9440 Test Plan: See #9440 Reviewers: simonpj, austin Reviewed By: simonpj, austin Subscribers: simonpj, simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D156 GHC Trac Issues: #9440
* concurrent/should_run/throwto002: DoRec -> RecursiveDoBen Gamari2014-08-181-1/+1
| | | | | | | | | | | | | | Summary: Test case used old extension name; update it. Test Plan: validate Reviewers: austin Reviewed By: austin Subscribers: simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D161
* ghci/scripts/ghci016: Add implementation for negateBen Gamari2014-08-181-0/+1
| | | | | | | | | | | | | | Summary: This previously produced a warning Test Plan: validate Reviewers: austin Reviewed By: austin Subscribers: simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D162
* Make T8832 operative on 32-bit systems (#8832)Reid Barton2014-08-184-3/+16
| | | | (Also, the 'extra_clean' was unnecessary.)
* Update list of flags implied by -XGADTs in User's Guide section on GADTsReid Barton2014-08-181-1/+2
|
* Fix broken link in Data.Data to SYB home page (Trac #9455)Simon Peyton Jones2014-08-181-9/+9
| | | | | Ralf Laemmel's page has disappeared, so I made it point to the Haskell Wiki page instead.
* Fix quasi-quoter documentation (#9448)Sergey Vinokurov2014-08-181-2/+2
|
* workaround Solaris 11 GNU C CPP issue by using GNU C 3.4 as CPPKarel Gardas2014-08-173-112/+102
| | | | | | | | | | | | | | | | | | | | | | | Summary: Solaris 11 distributed GNU C 4.5.x is configured in a way that its CPP is not working well while invoked from GHC. GHC runs it with -x assembler-with-cpp and in this particular configuration GNU C CPP does not provide any line-markers so GHC's output of errors or warnings is confusing since it points to preprocessed file in /tmp and not to the original Haskell file. Fortunately old GNU C 3.4.x is still provided by the OS and when installed it'll be used automatically as GHC CPP which is whole logic of this patch. So although we use modern GCC as a C compiler and assembler we use old GCC as a C preprocessor. Test Plan: validate Reviewers: austin Reviewed By: austin Subscribers: phaskell, simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D151
* Remove obsolete `digitsTyConKey :: Unique`Herbert Valerio Riedel2014-08-171-2/+2
| | | | | | | | This became dead with 1e87c0a6e485e1dbef8e9ed19191e54f6cdc54e0 and was probably just missed. I plan to re-use the freed up `mkPreludeTyConUnique 23` slot soon for a new `bigNatTyConKey` (as part of the #9281 effort)
* Workaround GCC `__ctzdi2` intrinsic linker errorsHerbert Valerio Riedel2014-08-171-1/+17
| | | | | | | | | | | | | | | | | | | | | | | On Linux/i386 the 64bit `__builtin_ctzll()` instrinsic doesn't get inlined by GCC but rather a short `__ctzdi2` runtime function is inserted when needed into compiled object files. This causes failures for the four test-cases TEST="T8639_api T8628 dynCompileExpr T5313" with error messages of the kind dynCompileExpr: .../libraries/ghc-prim/dist-install/build/libHSghcpr_BE58KUgBe9ELCsPXiJ1Q2r.a: unknown symbol `__ctzdi2' dynCompileExpr: dynCompileExpr: unable to load package `ghc-prim' This workaround forces GCC on 32bit x86 to to express `hs_ctz64` in terms of the 32bit `__builtin_ctz()` (this is no loss, as there's no 64bit BSF instruction on i686 anyway) and thus avoid the problematic out-of-line runtime function. Note: `__builtin_ctzll()` is used since e0c1767d0ea8d12e0a4badf43682a08784e379c6 (re #9340)
* Revert "Fix typos 'resizze'"Gabor Greif2014-08-163-3/+3
| | | | | | this is z-encoding (as hvr tells me) This reverts commit 425d5178af55620efa00e6e16426f491c63ad533.
* Fix typos 'resizze'Gabor Greif2014-08-163-3/+3
|
* Implement {resize,shrink}MutableByteArray# primopsHerbert Valerio Riedel2014-08-166-0/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two new primops with the type-signatures resizeMutableByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, MutableByteArray# s #) shrinkMutableByteArray# :: MutableByteArray# s -> Int# -> State# s -> State# s allow to resize MutableByteArray#s in-place (when possible), and are useful for algorithms where memory is temporarily over-allocated. The motivating use-case is for implementing integer backends, where the final target size of the result is either N or N+1, and only known after the operation has been performed. A future commit will implement a stateful variant of the `sizeofMutableByteArray#` operation (see #9447 for details), since now the size of a `MutableByteArray#` may change over its lifetime (i.e before it gets frozen or GCed). Test Plan: ./validate --slow Reviewers: ezyang, austin, simonmar Reviewed By: austin, simonmar Differential Revision: https://phabricator.haskell.org/D133
* Make configure's sed(1) expression for GHC_LDFLAGS more BSD-friendly.Gabor Pali2014-08-151-1/+1
|
* LlvmMangler: Be more selective when mangling object typesBen Gamari2014-08-151-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We previously did a wholesale replace of `%function` to `%object` to mangle object `.type` annotations. This is bad as it can end up replacing appearances of `"%function"` in the user's code. We now look for a proper `.type` keyword before performing the replacement. Thanks to @rwbarton for pointing out the bug. Test Plan: Previously, $ echo 'main = putStrLn "@function"' > test.hs $ ghc -fllvm test.hs $ ./test @object Now, $ echo 'main = putStrLn "@function"' > test.hs $ ghc -fllvm test.hs $ ./test @function Reviewers: rwbarton, austin Reviewed By: rwbarton, austin Subscribers: phaskell, simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D150 GHC Trac Issues: #9439
* Declare `ghc-head` to be haddock's upstream branchHerbert Valerio Riedel2014-08-141-0/+1
| | | | | | | | This will affect commands such as git submodule update --remote utils/haddock to use `ghc-head` instead of the default `master` branch
* Implement new CLZ and CTZ primops (re #9340)Herbert Valerio Riedel2014-08-1417-1/+347
| | | | | | | | | | | | | | | | | | | | | | | | This implements the new primops clz#, clz32#, clz64#, ctz#, ctz32#, ctz64# which provide efficient implementations of the popular count-leading-zero and count-trailing-zero respectively (see testcase for a pure Haskell reference implementation). On x86, NCG as well as LLVM generates code based on the BSF/BSR instructions (which need extra logic to make the 0-case well-defined). Test Plan: validate and succesful tests on i686 and amd64 Reviewers: rwbarton, simonmar, ezyang, austin Subscribers: simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D144 GHC Trac Issues: #9340
* Remove out of date TODOEdward Z. Yang2014-08-131-2/+0
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Explicitly version test for package key support.Edward Z. Yang2014-08-133-1/+14
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Have ghc-pkg use an old-style package key when it's not provided.Edward Z. Yang2014-08-131-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | Summary: When this occurs, it means that the user is using an old version of Cabal. In that case, don't barf out: just go ahead and install it as an old-style package key. The user won't be able to link multiple versions together, but that should not be a problem because their Cabal can't handle it anyway. What happens if old-style are mixed up with new-style? Well, currently with Cabal, it's indistinguishable. However, if at some later point we add private dependencies, libraries compiled with old style linker names are incompatible with each other. We'll cross that road when we come to it. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: tibbe, hvr, austin Subscribers: simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D154
* StgCmmPrim: add note to stop using fixed size signed types for sizesJohan Tibell2014-08-121-0/+5
| | | | | We use fixed size signed types to e.g. represent array sizes. This means that the size can overflow.
* Add some Haddocks to SMRepJohan Tibell2014-08-121-2/+13
|
* shouldInlinePrimOp: Fix Int overflowJohan Tibell2014-08-122-24/+43
| | | | | | | | | | | | | | | | There were two overflow issues in shouldInlinePrimOp. The first one is due to a negative CmmInt literal being created if the array size was given as larger than 2^63-1 (on a 64-bit platform.) This meant that large array sizes could compare as being smaller than maxInlineAllocSize. The second issue is that we casted the Integer to an Int in the comparison, which again meant that large array sizes could compare as being smaller than maxInlineAllocSize. The attempt to allocate a large array inline then caused a segfault. Fixes #9416.
* Testsuite wibbles around #9200Richard Eisenberg2014-08-125-14/+6
|