| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
The function was reading past the end of the FastString table, causing
the -dfaststring-stats option to behave unpredictably.
|
|
|
|
| |
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
|
|
| |
This lead to the stage1 compiler calculating random iface hashes.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
| |
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Roles are a solution to the GeneralizedNewtypeDeriving type-safety
problem.
Roles were first described in the "Generative type abstraction" paper,
by Stephanie Weirich, Dimitrios Vytiniotis, Simon PJ, and Steve Zdancewic.
The implementation is a little different than that paper. For a quick
primer, check out Note [Roles] in Coercion. Also see
http://ghc.haskell.org/trac/ghc/wiki/Roles
and
http://ghc.haskell.org/trac/ghc/wiki/RolesImplementation
For a more formal treatment, check out docs/core-spec/core-spec.pdf.
This fixes Trac #1496, #4846, #7148.
|
|
|
|
|
|
|
|
|
|
|
| |
I'd been meaning to do this for some time, but finally got around to it
due to the overflowing literals warning. With that enabled, we were
getting a warning for
-128 :: Int8
as that is parsed as
negate (fromInteger 128)
which just happens to do the right thing, as
negate (fromInteger 128) = negate (-128) = -128
|
| |
|
| |
|
|
|
|
| |
279ac9f66a83203448b279ea478b2cc1dafbd35d.
|
| |
|
| |
|
|
|
|
|
|
|
| |
This patch reworks some parts of the LLVM pretty-printing code that were
still using Show and String. Now we should be using SDoc and Outputable
throughout. Note that many get*Name functions become pp*Name
here as a side-effect.
|
|
|
|
|
|
|
|
|
|
| |
so that RULE text/str gets a chance to fire (Trac #7995).
And make sure that Outputable.text is inlined, so that the underlying
Pretty.text rule can fire.
The thing is that literal strings only turn into unpackCString#
in phase 1.
|
|
|
|
|
|
| |
Somtimes we need (xs ++ ys) in situations where ys is
almost always empty. Utils.chkAppend checks for that
case first.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A buglet that exposed an opportunity for some welcome refactoring
and simplification. Main changes
* TcMType.zonkQuantifiedTyVars is replaced by quantifyTyVars, which
does a bit more zonking (so that its clients do not need to)
* TcHsType.kindGeneralise becomes a bit simpler, and hands off
to quantifyTyVars
* A bit of simplification of the hacky code in TcTyClsDcls.tcConDecl,
where we figure out how to generalise the data constructor's type
* Improve the error message from badExistential when a constructor
has an existential type, by printing the offending type
* Some consequential simplification in simplifyInfer.
|
|
|
|
|
| |
On iOS, binaries are really static libraries, so we don't want to use
flags like -lm when linking them.
|
|
|
|
| |
I think these are all redundant, now that haddock uses the GHC API
|
| |
|
| |
|
|
|
|
|
|
| |
LLVM supports PIC on ARM from what I can see.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |
|
|
|
|
|
| |
In particular, this means that GHCi will use DLLs, rather than loading
object files itself.
|
|
|
|
| |
As far as I can see, they've never been enabled
|
| |
|
| |
|
|
|
|
| |
We only use the unicode characters if the locale supports them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This work was all done by
Achim Krause <achim.t.krause@gmail.com>
George Giorgidze <giorgidze@gmail.com>
Weijers Jeroen <jeroen.weijers@uni-tuebingen.de>
It allows list syntax, such as [a,b], [a..b] and so on, to be
overloaded so that it works for a variety of types.
The design is described here:
http://hackage.haskell.org/trac/ghc/wiki/OverloadedLists
Eg. you can use it for maps, so that
[(1,"foo"), (4,"bar")] :: Map Int String
The main changes
* The ExplicitList constructor of HsExpr gets witness field
* Ditto ArithSeq constructor
* Ditto the ListPat constructor of HsPat
Everything else flows from this.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Function responsible for parsing the static flags, that were spread
across two modules (StaticFlags and StaticFlagParser), are now
in one file. This is analogous to dynamic flags parsing, which is
also contained within a single module.
Signed-off-by: David Terei <davidterei@gmail.com>
|
|
|
|
| |
Signed-off-by: David Terei <davidterei@gmail.com>
|
|
|
|
| |
Submitted by: Stephen Paul Weber <singpolyma@singpolyma.net>
|
|
|
|
|
| |
This means that we can use the standard MonadIO class, rather than
needing our own copy.
|
| |
|
|
|
|
|
|
|
|
| |
I was tracking down an error looking like
Prelude.(!!): index too large
which is very unhelpful. This patch replaces at least some uses
of (!!) in GHC with getNth, which has a more helpful error
message (with DEBUG anyway)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Working towards removing FastBytes
|
|
|
|
|
|
|
|
|
|
|
| |
A step on the way to getting rid of FastBytes
slow nofib Compile times look like:
-1 s.d. -2.4%
+1 s.d. +3.4%
Average +0.4%
but looking at the times for the longer-running compilations I think the
change is just noise.
|
|
|
|
|
|
|
| |
Slow nofib Compile Times difference looks like just noise:
-1 s.d. -2.9%
+1 s.d. +2.9%
Average -0.1%
|