| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
This was supposed to happen a long time ago, but later is better than
never. This makes `-fwarn-lazy-unlifted-bindings` into a no-op (with its
own warning) to be removed in GHC 7.10.
This fixes #8022.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
| |
|
|
|
|
| |
This sets the SSE "version" to 1.0.
|
|
|
|
|
|
|
| |
LLVM's GHC calling convention only allows 128-bit SIMD vectors to be passed in
machine registers on X86-64. This may change in LLVM 3.4; the hidden flag
-fllvm-pass-vectors-in-regs causes all SIMD vector widths to be passed in
registers on both X86-64 and on X86-32.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit exposes GHC's internal compiler pipeline through a `Hooks`
module in the GHC API. It currently allows you to hook:
* Foreign import/exports declarations
* The frontend up to type checking
* The one shot compilation mode
* Core compilation, and the module iface
* Linking and the phases in DriverPhases.hs
* Quasiquotation
Authored-by: Luite Stegeman <stegeman@gmail.com>
Authored-by: Edsko de Vries <edsko@well-typed.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 6579a6c we removed existing comparison primops and introduced new ones
returning Int# instead of Bool. This commit (and associated commits in
array, base, dph, ghc-prim, integer-gmp, integer-simple, primitive, testsuite and
template-haskell) restores old names of primops. This allows us to keep
our API cleaner at the price of not having backwards compatibility.
This patch also temporalily disables fix for #8317 (optimization of
tagToEnum# at Core level). We need to fix #8326 first, otherwise
our primops code will be very slow.
|
| |
|
|
|
|
|
| |
It is off by default, which is meant to be a workaround for #8275.
Once #8275 is fixed we will enable this option by default.
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
This makes it consistent with the corresponding -cmm-sink flag
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Authored-by: David Luposchainsky <dluposchainsky@gmail.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|\ |
|
| |\ |
|
| | | |
|
| |\ \ |
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The parallel upsweep needs to know about _all_ the modules that make up
a module loop in order to correctly determine a module's external loop
dependencies. Otherwise, incorrect dependency information may be
computed, resulting in an eventual deadlock during compilation.
So don't filter boot modules in getModLoop, and instead have its callers
filter them when needed.
Following this change, GHC could compile itself via --make -O2 -j. Yay!
|
| | | | | |
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Conflicts:
compiler/main/DynFlags.hs
compiler/utils/FastString.lhs
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In the parallel upsweep, typecheckLoop has to use a different DynFlags
than the one in its HscEnv argument so that the debug message in
typecheckLoop will be outputted in order.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The parallel upsweep is the parallel counterpart to the default
sequential upsweep. It attempts to compile modules in parallel by
subdividing the work of the upsweep into parts that can be executed
concurrently by multiple Haskell threads.
In order to enable the parallel upsweep, the user has to pass the -jN
flag to GHC, where N is an optional number denoting the number of jobs,
or modules, to compile in parallel, like with GNU make. In GHC this just
sets the number of capabilities to N.
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| |_|_|_|/
|/| | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
also added -fdmd-tx-dict-sel, on by default
|
| |_|_|/
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This patch encompasses most of the basic infrastructure for GHCJS. It
includes:
* A new extension, -XJavaScriptFFI
* A new architecture, ArchJavaScript
* Parser and lexer support for 'foreign import javascript', only
available under -XJavaScriptFFI, using ArchJavaScript.
* As a knock-on, there is also a new 'WayCustom' constructor in
DynFlags, so clients of the GHC API can add custom 'tags' to their
built files. This should be useful for other users as well.
The remaining changes are really just the resulting fallout, making sure
all the cases are handled appropriately for DynFlags and Platform.
Authored-by: Luite Stegeman <stegeman@gmail.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |_|/
|/| |
| | |
| | |
| | | |
Authored-by: Luke Iannini <lukexi@me.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The original problem was that we weren't bringing varaibles bound in the
interactive context into scope before Linting the result of a top-level
declaration in GHCi. (We were doing this for expressions.)
Moreover I found that we weren't Linting the result of desugaring
a GHCi expression, which we really should be doing.
It took me a bit of time to unravel all this, and I did some refactoring
to make it easier next time.
* CoreMonad contains the Lint wrappers that get the right
environments into place. It always had endPass and lintPassResult
(which Lints bindings), but now it has lintInteractiveExpr.
* Both use a common function CoreMonad.interactiveInScope to find
those in-scope variables.
Quite a bit of knock-on effects from this, but nothing exciting.
|
| |
| |
| |
| | |
Fixes #8200
|
| |
| |
| |
| | |
cf http://ghc.haskell.org/trac/ghc/wiki/LateDmd
|
| |
| |
| |
| |
| |
| |
| | |
This fixes Trac #8191.
The patch also adds and documents a new flag -fmax-relevant-bindings=N
which lets you control how many bindings in the type environment are shown.
|
| |
| |
| |
| | |
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Under -XNumDecimals, it's possible to specify an integer literal using
compact "floating point" syntax for any floating literal constant which
also happens to be an integer. This lets us write
1.2e6 :: Integer
instead of:
1200000 :: Integer
This also makes some amendments to the users guide.
Authored-by: Shachaf Ben-Kiki <shachaf@gmail.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |
| |
| |
| |
| |
| | |
Fixes #8175.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
iOS has some particular constraints about how applications can be built:
* We must generate a static library (.a) since XCode does the final
link.
* We need to carefully give the right set of arguments to libtool in
the case we're generating an archive.
* Dynamic linking isn't supported.
* It can only be done on OS X.
This patch cleans up all of the above. We add a new flag `-staticlib`
(only supported on Darwin) that allows us to produce archive files using
libtool, and a -pgmlibtool flag to control which 'libtool' executable to
use.
This fixes #8127. I believe this is the last piece missing from the iOS
cross compiler.
Authored-by: Luke Iannini <lukexi@me.com>
Authored-by: Maxwell Swadling <maxwellswadling@gmail.com>
Authored-by: Stephen Blackheath <...@blacksapphire.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
| |
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
|
|
| |
This brings them up to date with the changes in #8144.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
| |
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #8144.
Before, the modification time of e.g. #included files (and everything
that ends up as a UsageFile, e.g. via addDependentFile) was taken as
input for the interface hash of a module.
This lead to different hashes for identical inputs on every compilation.
We now use file content hashes instead.
This changes the interface file format.
You will get "Binary.get(Usage): 50" when you try to do an incremental
using .hi files that were created with a GHC 7.7 (only) older than this commit.
To calculate the md5 hash (`Fingerprint`) of a file in constant space,
there now is GHC.Fingerprint.getFileHash, and a fallback version
for older GHCs that needs to load the file into memory completely
(only used when compiling stage1 with an older GHC).
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 1e2b3780ebc40d28cd0f029b90df102df09e6827 I changed the option
ordering for C compilations. A side effect was that -optc options
came before the automatic -O we were adding, which made it so that the
-debug RTS was getting optimised when it shouldn't have been.
Perhaps we shouldn't have automatic -O options added to C
compilations. But that might cause problems for build systems that
are relying on the current behaviour, so I've made a minor change
instead: now C optimisation level == Haskell optimisation level.
|
|
|
|
|
|
|
|
|
|
|
| |
When cross compiling to iOS, we generate archive files which are linked
into the final executable. We already *did* generate archive files -
just with the wrong suffix.
Fixes #8125.
Authored-by: Stephen Blackheath <...@blacksapphire.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|