| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
In particular, print a bit of debug info in debug-style and dump-style
Otherwise distinct type variables look the same
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
to allow the programer to explictitly set the oneShot flag. This helps
with #7994 and will be used in left folds. Also see
https://ghc.haskell.org/trac/ghc/wiki/OneShot
This commit touches libraries/base/GHC/Event/Manager.hs (which used to
have a local definition of the name oneShot) to avoid a shadowing error.
Differential Revision: https://phabricator.haskell.org/D392
|
|
|
|
| |
Differential Revision: https://phabricator.haskell.org/D391
|
|
|
|
| |
since they are disallowed both in class and instance declarations
|
| |
|
| |
|
|
|
|
| |
This should fix #8953.
|
| |
|
| |
|
|
|
|
| |
Fix #9262.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: -optdef flags were deprecated in or before 2008
Reviewers: austin
Reviewed By: austin
Subscribers: thomie, carter, simonmar
Differential Revision: https://phabricator.haskell.org/D409
GHC Trac Issues: #2773
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: It seems to be dead anyway. Also update Haddock submodule.
Test Plan: validate
Reviewers: austin
Reviewed By: austin
Subscribers: thomie, goldfire, carter, simonmar
Differential Revision: https://phabricator.haskell.org/D357
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: None really.
Reviewers: austin
Reviewed By: austin
Subscribers: thomie, carter, simonmar
Differential Revision: https://phabricator.haskell.org/D386
GHC Trac Issues: #9734
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Signed-off-by: Rodlogic <admin@rodlogic.net>
Test Plan: Does it compile?
Reviewers: hvr, austin
Reviewed By: austin
Subscribers: thomie, carter, simonmar
Differential Revision: https://phabricator.haskell.org/D319
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Integer is currently a wired-in type for integer-gmp. This requires
replicating its inner structure in `TysWiredIn`, which makes it much
harder to change Integer to a more complex representation (as
e.g. needed for implementing #9281)
This commit stops `Integer` being a wired-in type, and makes it
known-key type instead, thereby simplifying code notably.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D351
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The function is defined in TcForeign module, but misspelled comment
makes it hard to find
Reviewers: austin
Reviewed By: austin
Subscribers: thomie, carter, ezyang, simonmar
Differential Revision: https://phabricator.haskell.org/D368
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Module signatures, like hs-boot files, are Haskell modules which omit
value definitions and contain only signatures. This patchset implements
one particular aspect of module signature, namely compiling them against
a concrete implementation. It works like this: when we compile an hsig
file, we must be told (via the -sig-of flag) what module this signature
is implementing. The signature is compiled into an interface file which
reexports precisely the entities mentioned in the signature file. We also
verify that the interface is compatible with the implementation.
This feature is useful in a few situations:
1. Like explicit import lists, signatures can be used to reduce
sensitivity to upstream changes. However, a signature can be defined
once and then reused by many modules.
2. Signatures can be used to quickly check if a new upstream version
is compatible, by typechecking just the signatures and not the actual
modules.
3. A signature can be used to mediate separate modular development,
where the signature is used as a placeholder for functionality which
is loaded in later. (This is only half useful at the moment, since
typechecking against signatures without implementations is not implemented
in this patchset.)
Unlike hs-boot files, hsig files impose no performance overhead.
This patchset punts on the type class instances (and type families) problem:
instances simply leak from the implementation to the signature. You can
explicitly specify what instances you expect to have, and those will be checked,
but you may get more instances than you asked for. Our eventual plan is
to allow hiding instances, but to consider all transitively reachable instances
when considering overlap and soundness.
ToDo: signature merging: when a module is provided by multiple signatures
for the same base implementation, we should not consider this ambiguous.
ToDo: at the moment, signatures do not constitute use-sites, so if you
write a signature for a deprecated function, you won't get a warning
when you compile the signature.
Future work: The ability to feed in shaping information so that we can take
advantage of more type equalities than might be immediately evident.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate and new tests
Reviewers: simonpj, simonmar, hvr, austin
Subscribers: simonmar, relrod, ezyang, carter, goldfire
Differential Revision: https://phabricator.haskell.org/D130
GHC Trac Issues: #9252
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This revision enables -fwarn-tabs by default and add a suppression
flag, so that GHC compilation won't fail when some files contain tab
characters.
Test Plan: Additional test case, T9230, was added to cover that change.
Reviewers: austin
Reviewed By: austin
Subscribers: simonmar, ezyang, carter, thomie, mlen
Differential Revision: https://phabricator.haskell.org/D255
GHC Trac Issues: #9230
Conflicts:
testsuite/driver/testlib.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
CodeGen.Platform.hs was changed with the following diff:
-#endif
globalRegMaybe _ = Nothing
+#elif MACHREGS_NO_REGS
+globalRegMaybe _ = Nothing
+#else
+globalRegMaybe = panic "globalRegMaybe not defined for this platform"
+#endif
which causes globalRegMaybe ot panic for arch ARM.
This patch ensures globalRegMaybe is not called on ARM.
Signed-off-by: Moritz Angermann <moritz@lichtzwerge.de>
Test Plan: Building arm cross-compiler (e.g. --target=arm-apple-darwin10)
Reviewers: hvr, ezyang, simonmar, rwbarton, austin
Reviewed By: austin
Subscribers: dterei, bgamari, simonmar, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D208
GHC Trac Issues: #9593
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Fix #9692.
The reifier didn't account for the possibility that data/newtype
instances are sometimes eta-reduced. It now eta-expands as necessary.
Test Plan: th/T9692
Reviewers: simonpj, austin
Subscribers: thomie, carter, ezyang, simonmar
Differential Revision: https://phabricator.haskell.org/D355
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit b23ba2a7d612c6b466521399b33fe9aacf5c4f75.
Conflicts:
compiler/cmm/PprCmmDecl.hs
compiler/nativeGen/PPC/Ppr.hs
compiler/nativeGen/SPARC/Ppr.hs
compiler/nativeGen/X86/Ppr.hs
|
|
|
|
| |
This reverts commit 3b5a840bba375c4c4c11ccfeb283f84c3a1ef22c.
|
|
|
|
| |
This reverts commit 178eb9060f369b216f3f401196e28eab4af5624d.
|
|
|
|
|
|
|
| |
This reverts commit 35672072b4091d6f0031417bc160c568f22d0469.
Conflicts:
compiler/main/DriverPipeline.hs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Get these lines fitting in 80 columns, and replace ptext (sLit ...) with text
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonmar, austin
Subscribers: thomie, carter, ezyang, simonmar
Differential Revision: https://phabricator.haskell.org/D342
|
|
|
|
|
|
|
|
|
|
|
|
| |
This finally removes the `Data.OldTypeable` module (which
has been deprecated in 7.8), from `base`, compiler and testsuite.
The deprecated `Typeable{1..7}` aliases in `Data.Typeable` are not
removed yet in order to give existing code a bit more time to adapt.
Reviewed By: hvr, dreixel
Differential Revision: https://phabricator.haskell.org/D311
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This is an optimization to the CTZ primops introduced for #9340
Previously we called out to `hs_ctz64`, but we can actually generate
better hand-tuned code while avoiding the FFI ccall.
With this patch, the code
{-# LANGUAGE MagicHash #-}
module TestClz0 where
import GHC.Prim
ctz64 :: Word64# -> Word#
ctz64 x = ctz64# x
results in the following assembler generated by NCG on i386:
TestClz.ctz64_info:
movl (%ebp),%eax
movl 4(%ebp),%ecx
movl %ecx,%edx
orl %eax,%edx
movl $64,%edx
je _nAO
bsf %ecx,%ecx
addl $32,%ecx
bsf %eax,%eax
cmovne %eax,%ecx
movl %ecx,%edx
_nAO:
movl %edx,%esi
addl $8,%ebp
jmp *(%ebp)
For comparision, here's what LLVM 3.4 currently generates:
000000fc <TestClzz_ctzz64_info>:
fc: 0f bc 45 04 bsf 0x4(%ebp),%eax
100: b9 20 00 00 00 mov $0x20,%ecx
105: 0f 45 c8 cmovne %eax,%ecx
108: 83 c1 20 add $0x20,%ecx
10b: 8b 45 00 mov 0x0(%ebp),%eax
10e: 8b 55 08 mov 0x8(%ebp),%edx
111: 0f bc f0 bsf %eax,%esi
114: 85 c0 test %eax,%eax
116: 0f 44 f1 cmove %ecx,%esi
119: 83 c5 08 add $0x8,%ebp
11c: ff e2 jmp *%edx
Reviewed By: austin
Auditors: simonmar
Differential Revision: https://phabricator.haskell.org/D163
|
|
|
|
|
|
|
|
|
|
| |
Akio found an avoidable cause of non-determinisim: The names of RULES
generated by Specialise had uniques in them:
"SPEC $cshowsPrec_a2QX @ [GHC.Types.Char]" [ALWAYS] forall ...
By using showSDocForUser instead of showSDocDump when building the rule
name, this is avoided:
"SPEC $cshowsPrec @ [Char]" [ALWAYS] forall ...
See #4012, comments 61ff.
|
| |
|
|
|
|
|
| |
otherwise this can retain large lazy calculations. This fixed one space
leak pointed out in #9675.
|
|
|
|
|
|
|
|
|
|
| |
Summary: now that we can rely on having containers > 0.5.
Reviewers: austin
Subscribers: thomie, carter, ezyang, simonmar
Differential Revision: https://phabricator.haskell.org/D321
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Carter Schonwald suggested looking for opportunities to replace
instructions in GHC's output by equivalent ones that are shorter,
as recommended by the Intel optimization manuals.
This patch reduces the module sizes as reported by nofib
by about 1.5% on x86_64.
Test Plan:
Built an i386 cross-compiler and ran the test suite; the same
(rather large) set of tests failed before and after this commit.
Will let Harbormaster validate on x86_64.
Reviewers: austin
Subscribers: thomie, carter, ezyang, simonmar
Differential Revision: https://phabricator.haskell.org/D320
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The code is equivalent, just formatted nicely and without the
enthusiastic message to clean it up.
Test Plan: None
Reviewers: austin
Reviewed By: austin
Subscribers: simonmar, ezyang, carter, thomie
Differential Revision: https://phabricator.haskell.org/D307
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Provide a way to generate {-# LINE #-} pragmas when generating
Decs in Template Haskell. This allows more meaningful line
numbers to be reported in compile-time errors for dynamically
generated code.
Test Plan: Run test suite
Reviewers: austin, hvr
Reviewed By: austin
Subscribers: hvr, simonmar, ezyang, carter, thomie
Differential Revision: https://phabricator.haskell.org/D299
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
With the exception of the todo added in 2012, this function has been
untouched since 2007. It is not used anywhere else in GHC, so it appears
to be safe to remove. The accompanying comment refers to hashExpr, which
I couldn't find anywhere in the sources, either.
Test Plan: Removed declaration and export. Compiler built succesfully. No test cases exist to fail, and no other module appears to use it.
Reviewers: thomie, austin
Reviewed By: thomie, austin
Subscribers: simonmar, ezyang, carter, thomie
Differential Revision: https://phabricator.haskell.org/D261
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
#9094 mentions to "remove the RAW_CPP bits from the ghc build system because
they're not longer needed", "once the CPP settings ticket is merged #8683"
#8683 was merged with 34f7e9a3c99850859901ca74370f55f1d4e2279a, Phab:D26.
Test Plan: harbormaster
Reviewers: carter, austin
Reviewed By: austin
Subscribers: simonmar, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D240
GHC Trac Issues: #9094
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This exposes the `cProjectPatchLevel{1,2}` value at the CPP level to
allow it to be used in CPP conditionals. Concretely, GHC 7.10.2.20150623
would result in
#define __GLASGOW_HASKELL__ 710
#define __GLASGOW_HASKELL_PATCHLEVEL1__ 2
#define __GLASGOW_HASKELL_PATCHLEVEL2__ 20150623
while GHC 7.10.3 results in
#define __GLASGOW_HASKELL__ 710
#define __GLASGOW_HASKELL_PATCHLEVEL1__ 3
and finally GHC 7.9.20141009 results in
#define __GLASGOW_HASKELL__ 709
#define __GLASGOW_HASKELL_PATCHLEVEL1__ 20141009
As it's error-prone to properly express CPP conditionals for testing GHC
multi-component versions, a new macro `MIN_VERSION_GLASGOW_HASKELL()` is
provided (also via the new CPP include file `ghcversion.h`)
Finally, in order to make it easier to define the new CPP macro
`MIN_VERSION_GLASGOW_HASKELL()`, a new default-included
`include/ghcversion.h` is used for the new CPP definitions.
Reviewed By: ekmett, austin, #ghc
Differential Revision: https://phabricator.haskell.org/D66
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To reproduce build failure it's enough to try
to build GHC on amd64 with the following setup:
$ cat mk/build.mk
# for #9552
GhcWithInterpreter = NO
It gives:
Reachable modules from DynFlags out of date
Please fix compiler/ghc.mk, or building DLLs on Windows may break (#7780)
Redundant modules: Bitmap BlockId ... <list of 42 modules>
<make error>
dll-split among other things makes sure
all mentioned modules are used by DynFlags.
'#ifdef GHCI' keeps is from happening.
Patch moves those 42 modules under
'GhcWithInterpreter' guard.
Fixes Issue #9552
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|/
|
|
| |
Fixes Trac #9658
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Using `dropWhileEndLE` tends to be faster and easier to read
than the `reverse . dropWhile p . reverse` idiom. This also cleans up
some other, nearby, messes. Fix #9616 (incorrect number formatting
potentially leading to incorrect numbers in output).
Test Plan: Run validate
Reviewers: thomie, rwbarton, nomeata, austin
Reviewed By: nomeata, austin
Subscribers: simonmar, ezyang, carter, thomie
Projects: #ghc
Differential Revision: https://phabricator.haskell.org/D259
GHC Trac Issues: #9623, #9616
Conflicts:
compiler/basicTypes/OccName.lhs
|
|
|
|
| |
This reverts commit 2a8856884de7d476e26b4ffa829ccb3a14d6f63e.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
In preparation for indirecting all references to closures,
we rename _closure to _static_closure to ensure any old code
will get an undefined symbol error. In order to reference
a closure foobar_closure (which is now undefined), you should instead
use STATIC_CLOSURE(foobar). For convenience, a number of these
old identifiers are macro'd.
Across C-- and C (Windows and otherwise), there were differing
conventions on whether or not foobar_closure or &foobar_closure
was the address of the closure. Now, all foobar_closure references
are addresses, and no & is necessary.
CHARLIKE/INTLIKE were not changed, simply alpha-renamed.
Part of remove HEAP_ALLOCED patch set (#8199)
Depends on D265
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Test Plan: validate
Reviewers: simonmar, austin
Subscribers: simonmar, ezyang, carter, thomie
Differential Revision: https://phabricator.haskell.org/D267
GHC Trac Issues: #8199
|