summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix freeHaskellFunPtr crash on iOS.Austin Seipp2013-09-152-1/+45
| | | | | Authored-by: Stephen Blackheath <...@blacksapphire.com> Signed-off-by: Austin Seipp <austin@well-typed.com>
* New primops for byte range copies ByteArray# <-> Addr#Duncan Coutts2013-09-152-0/+70
| | | | | | | | | | | | | | | | | | | | | | | We have primops for copying ranges of bytes between ByteArray#s: * ByteArray# -> MutableByteArray# * MutableByteArray# -> MutableByteArray# This extends it with three further cases: * Addr# -> MutableByteArray# * ByteArray# -> Addr# * MutableByteArray# -> Addr# One use case for these is copying between ForeignPtr-based representations and in-heap arrays (like Text, UArray etc). The implementation is essentially the same as for the existing primops, and shares the memcpy stuff in the code generators. Defficiencies / future directions: none of these primops (existing or the new ones) let one take advantage of knowing that ByteArray#s are word-aligned in memory. Though it is unclear that any of the code generators would make use of this information unless the size to copy is also known at compile time. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Cause "make install" to install dynamic libraries (#8194)Bryan O'Sullivan2013-09-152-5/+8
| | | | | | Our special ghc-cabal command needs to be told that we are building with dynamic library support when it does its copying. We do so by passing an extra parameter from ghc.mk.
* 80 columnsSimon Marlow2013-09-141-5/+8
|
* add stg_MUT_VAR_CLEAN_info and stg_MUT_VAR_DIRTY_info to the symbol tableSimon Marlow2013-09-141-0/+2
|
* Nuke tabs in rts/posix/OSMem.cAustin Seipp2013-09-141-31/+31
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Fix getPageSize to actually cache the page size.Austin Seipp2013-09-141-7/+8
| | | | | | This fixes #8289. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Mention coerce in the release notesJoachim Breitner2013-09-141-0/+21
| | | | | | It is not added to the section on Special built-in functions because the (from a user POV related) unsafeCoerce has been removed there recently.
* Fix links in #special-ids sectionJoachim Breitner2013-09-141-2/+2
| | | | | This completes the change from [7ea49661c]: GHC.Exts lives in base, not in ghc-prim.
* Give language pragma suggestions without -XJoachim Breitner2013-09-1419-75/+75
| | | | for easier copy'n'paste. This fixes: #3647
* Implement __mod_init_func for Mach-O. Finishes support for init in #5435.Edward Z. Yang2013-09-131-24/+57
| | | | Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* Implement .ctor support for PEi386.Edward Z. Yang2013-09-131-5/+50
| | | | Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* Implement .init/.init_array support for ELF.Edward Z. Yang2013-09-132-0/+60
| | | | Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* Fix rebase falloutJoachim Breitner2013-09-141-1/+1
| | | | To push what was validated, not just what was commited.
* Introduce coerce :: Coercible a b -> a -> bcoercibleJoachim Breitner2013-09-1312-13/+440
| | | | | | | | | | | This is the result of the design at http://ghc.haskell.org/trac/ghc/wiki/NewtypeWrappers The goal is to be able to convert between, say [First Int] and [Last Int] with zero run-time overhead. To that end, we introduce a special two parameter type class Coercible whose instances are created automatically and on-the fly. This relies on and exploits the recent addition of roles to core.
* Expose tcTyConsOfType as Types.tyConsOfTypeJoachim Breitner2013-09-134-35/+40
| | | | and add related function tyConsOfTyCon.
* Outputable.isOrAre: "is" or "are" for correct grammarJoachim Breitner2013-09-131-1/+10
|
* Expose more in the TcS monadJoachim Breitner2013-09-131-2/+20
| | | | in preparation for the Coercible class implementation.
* Allow primclass and class constraints in primopsJoachim Breitner2013-09-135-9/+48
| | | | In preparation for the primitive class Coercible
* Release note for new `instance Data Data.Version`Herbert Valerio Riedel2013-09-131-0/+5
| | | | | | Implemented in [e17549c80425f3c8a8a672c65bbff00290839f3c/base] Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Update Cabal to current upstream `1.18` branch tipHerbert Valerio Riedel2013-09-131-0/+0
| | | | | The new commits inlcude AMP-warning fixes and support for the new `instance Data Data.Version` provided by `base`
* Missing printf path format changeSimon Peyton Jones2013-09-131-1/+1
|
* Replace reference to `Data.Generics` with `Data.Data`Herbert Valerio Riedel2013-09-131-1/+1
| | | | | | | The `Data` definitions were moved from `Data.Generics` to `Data.Data` via [5a9e76d24776608a3e14ba94f1dfa0cac072c251/base] Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Rename -ddump-cmm-rewrite to -ddump-cmm-sinkJan Stolarek2013-09-132-3/+3
| | | | This makes it consistent with the corresponding -cmm-sink flag
* Fix static GHCi build (#8270)Austin Seipp2013-09-131-0/+2
| | | | | | | | | | When Ryan merged in the atomics branch, he made atomic_inc and atomic_dec EXTERN_INLINE functions, meaning their definitions became part of object files in the non-threaded build, instead of being inlined. As a result, this broke the linker for static GHCi, since it couldn't properly resolve the now-externally defined functions. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Add support for evaluation of type-level natural numbers.Iavor S. Diatchki2013-09-1229-27/+887
| | | | | | | | | | | | | | | | | | | | | | | | | This patch implements some simple evaluation of type-level expressions featuring natural numbers. We can evaluate *concrete* expressions that use the built-in type families (+), (*), (^), and (<=?), declared in GHC.TypeLits. We can also do some type inference involving these functions. For example, if we encounter a constraint such as `(2 + x) ~ 5` we can infer that `x` must be 3. Note, however, this is used only to resolve unification variables (i.e., as a form of a constraint improvement) and not to generate new facts. This is similar to how functional dependencies work in GHC. The patch adds a new form of coercion, `AxiomRuleCo`, which makes use of a new form of axiom called `CoAxiomRule`. This is the form of evidence generate when we solve a constraint, such as `(1 + 2) ~ 3`. The patch also adds support for built-in type-families, by adding a new form of TyCon rhs: `BuiltInSynFamTyCon`. such built-in type-family constructors contain a record with functions that are used by the constraint solver to simplify and improve constraints involving the built-in function (see `TcInteract`). The record in defined in `FamInst`. The type constructors and rules for evaluating the type-level functions are in a new module called `TcTypeNats`.
* Improve sinking passJan Stolarek2013-09-123-42/+216
| | | | | | | | | | | | | | | | | | | | This commit does two things: * Allows duplicating of global registers and literals by inlining them. Previously we would only inline global register or literal if it was used only once. * Changes method of determining conflicts between a node and an assignment. New method has two advantages. It relies on DefinerOfRegs and UserOfRegs typeclasses, so if a set of registers defined or used by a node should ever change, `conflicts` function will use the changed definition. This definition also catches more cases than the previous one (namely CmmCall and CmmForeignCall) which is a step towards making it possible to run sinking pass before stack layout (currently this doesn't work). This patch also adds a lot of comments that are result of about two-week long investigation of how sinking pass works and why it does what it does.
* Add missing semicolon in rts/Linker.c (#8271)Jan Stolarek2013-09-121-8/+8
| | | | And remove some trailing whitespaces from that file.
* Implement the AMP warning (#8004)Austin Seipp2013-09-118-6/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements a warning when definitions conflict with the Applicative-Monad Proposal (AMP), described in #8004. Namely, this will cause a warning iff: * You have an instance of Monad, but not Applicative * You have an instance of MonadPlus, but not Alternative * You locally defined a function named join, <*>, or pure. In GHC 7.10, these warnings will actually be enforced with superclass constraints through changes in base, so programs will fail to compile then. This warning is enabled by default. Unfortunately, not all of our upstream libraries have accepted the appropriate patches. So we temporarily fix ./validate by ignoring the AMP warning. Dan Rosén made an initial implementation of this change, and the remaining work was finished off by David Luposchainsky. I finally made some minor refactorings. Authored-by: Dan Rosén <danr@chalmers.se> Authored-by: David Luposchainsky <dluposchainsky@gmail.com> Signed-off-by: Austin Seipp <austin@well-typed.com>
* Fix AMP warnings.Austin Seipp2013-09-1132-20/+283
| | | | | Authored-by: David Luposchainsky <dluposchainsky@gmail.com> Signed-off-by: Austin Seipp <austin@well-typed.com>
* User guide typo: Missing ) in #language-pragmaJoachim Breitner2013-09-111-1/+1
|
* Update submodule `random` to point to latest HEADHerbert Valerio Riedel2013-09-111-0/+0
|
* Drop proc-points that don't exist in the graph (#8205)Jan Stolarek2013-09-112-20/+50
| | | | | | | | On some architectures it might happen that stack layout pass will invalidate the list of calculated procpoints by dropping some of them. We fix this by checking whether a proc-point is in a graph at the beginning of proc-point analysis. This is a speculative fix for #8205.
* GHCi: Fix multi-line input line/column-number refsHerbert Valerio Riedel2013-09-111-7/+34
| | | | | | | | | | | | | | This commit addresses #8051 by fixing - Incorrect column indices reported in error messages for single-line and multi-line input, - incorrect line numbers reported in error messages for expressions entered in multi-line input, and - inhibiting the confusing interaction between `:{` and `:set +m` causing the triggering of implicit multi-line continuation mode right after `:}` terminates the multi-line entry block.
* Update Git repo URL in `bin-packages-db.cabal`Herbert Valerio Riedel2013-09-111-2/+3
| | | | This is related to #8121
* factor 'tcRnModuleTcRnM' out of 'tcRnModule' and export itNicolas Frisby2013-09-101-12/+22
| | | | | | | | | | | 'tcRnModuleTcRnM' builds the TcRnM monad computation that is the bulk of 'tcRnModule' This commit makes it simpler for courageous Core plugins to invoke the typechecker. In particular, they no longer need to copy-and-paste what is now the body of 'tcRnModuleTcRnM'. The key change is that the 'tcRnModuleTcRnM' computation can be run with (a hypothetical) 'initTcFromCoreM' instead of 'initTc'.
* Improve error reporting for "relevant bindings" again (Trac #8233)Simon Peyton Jones2013-09-107-39/+59
| | | | | | | | | | | | | | | | | This patch makes a number of related improvements: * Displays relevant bindings in innermost-first order. The inner ones are closer to the error. * Does not display syntactically top-level bindings, unless you say -fno-max-relevant-bindings. This is what Trac #8233 was mainly about * Makes the TopLevelFlag in a TcIdBinder really mean "syntactically top level". It was a bit vague before. There was some associated simplification, because we no longer need to pas a TopLevelFlag to tcMonoBinds and friends.
* Improve the insolubility check when quantifyingSimon Peyton Jones2013-09-101-5/+11
| | | | | See Note [Quantification with errors] Fixes Trac #8262
* Comments onlySimon Peyton Jones2013-09-101-2/+2
|
* Improve -flate-dmd-anal documentationSimon Peyton Jones2013-09-101-1/+5
|
* Remove dead codeJan Stolarek2013-09-103-14/+2
|
* More release note fixes.Austin Seipp2013-09-092-7/+1
| | | | | | This is what I get for being so hasty for release notes. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Typo fix. Spotted by Mikhail Glushenkov.Austin Seipp2013-09-091-1/+1
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Add release notes for parallel compilation driver.Austin Seipp2013-09-093-0/+27
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Fix ./validate with GHC 7.6 as bootstrap compiler.Austin Seipp2013-09-091-0/+4
| | | | | | | | | 7.6 deprecated the Control.Concurrent.QSem module (to be removed later,) but according to Patrick it was actually un-deprecated. As a result, validate fails if your bootstrap compiler is 7.6, since it throws a DEPRECATED warning. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Merge branch 'ghc-parmake-gsoc' (#910)Patrick Palka2013-09-0914-204/+683
|\
| * Merge remote-tracking branch 'origin/master' into ghc-parmake-gsocghc-parmake-gsocPatrick Palka2013-09-0824-103/+220
| |\
| * | Have `ghc --info` report support for parallel --makePatrick Palka2013-09-061-0/+1
| | |
| * | Merge remote-tracking branch 'origin/master' into ghc-parmake-gsocPatrick Palka2013-09-0617-45/+112
| |\ \
| * | | Fix bootstrapping of GHC with earlier versionsPatrick Palka2013-09-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can no longer use atomic_inc() in the stage1 compiler because its prototype was recently changed. Since the stage1 compiler is always single-threaded, only use atomic_inc() when THREADED_RTS is defined.