| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
This fixes Trac #9971
Merge into the 7.10 branch
|
|
|
|
|
|
|
|
| |
Fixes Trac #9997.
In doing this I tripped across the specialness of "this" in
PackageImports. The magic constant (fsLit "this") is scattered across
the compiler and ought to be put in one place. But where?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As suggested in
https://www.haskell.org/pipermail/libraries/2013-October/021531.html
this adds the following instances
- `Show a => Show (Const a b)`
- `Read a => Read (Const a b)`
- `Eq a => Eq (Const a b)`
- `Ord a => Ord (Const a b)`
The Read/Show instances are defined in such a way as if `Const` was defined
without record-syntax (i.e. as `newtype Const a b = Const a`)
Addresses #9984
Reviewed By: ekmett
Differential Revision: https://phabricator.haskell.org/D619
|
|
|
|
| |
And rename the wrongly named rebindable/T5821 to T5908 (Trac #5908)
|
|
|
|
|
|
|
|
|
|
|
|
| |
The provoking cause was Trac #5821, which concerned
type families, but in fixing it I did the usual round
of tidying up and docmenting.
The main comment is now
Note [Handling SPECIALISE pragmas]
in TcBinds.
It is "wrinkle 2" that fixes #5821.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main point is described in Note [Solve order for RULES].
I'm not sure if the potential bug described there could actually
happen, but I bet it could. Anyway, this patch explicitly solves
LHS constraints and *then* RHS constraints (see the Note).
I also moved simplifyRule from TcSimplify (a large module) to
TcRules (a small one), which brings related code together.
It did mean I had to export runTcS from TcSimplify, but I think
that's a price worth paying.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Very large modules can sometimes contain very large SRT bitmaps (this
is a separate problem that I need to look into). The large bitmaps
often contain a lot of zeros, so this patch skips over empty words in
the bitmap.
It makes a dramatic difference in the particular example that I saw,
where an old gen GC was taking 0.5s before this change and 0.07s after
it.
|
|
|
|
|
| |
Having debugging info doesn't hurt performance, can be stripped from
binaries, and it's useful for debugging and profiling.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
- Don't bracket HsTick expression uneccessarily
- Generate debug information in UTF8
- Reduce amount of information generated - we do not currently need
block information, for example.
Special thanks to slyfox for the reports!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Disallow wildcards in stand-alone deriving instances
(StandaloneDeriving), default signatures (DefaultSignatures) and
instances signatures (InstanceSigs).
Test Plan: validate
Reviewers: austin
Reviewed By: austin
Subscribers: carter, thomie, monoidal
Differential Revision: https://phabricator.haskell.org/D595
GHC Trac Issues: #9922
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
A mutex is used to protect the SPT.
unsafeLookupStaticPtr and staticPtrKeys in GHC.StaticPtr are made
monadic.
SPT entries are removed in a destructor function of modules.
Authored-by: Facundo DomÃnguez <facundo.dominguez@tweag.io>
Authored-by: Alexander Vershilov <alexander.vershilov@tweag.io>
Test Plan: ./validate
Reviewers: austin, simonpj, hvr
Subscribers: carter, thomie, qnikst, mboes
Differential Revision: https://phabricator.haskell.org/D587
GHC Trac Issues: #9878
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Package environments are files with package IDs that indicate which packages should be visible; see entry in user guide for details.
Reviewers: duncan, austin
Reviewed By: duncan, austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D558
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
see Trac #8624
similar functionality is now available
with -ddump-to-file -ddump-splices
However, users are already accustomed to -ddump-splices
having a particular format, and this format is not completely valid code
The goal of -th-file is to dump valid Haskell code
Additionally, the convention of -ddump-to-file is to name the file after
the flag, so the file is .dump-splices
Given that the goal of the new flag is to generate valid Haskell,
The extension should be .hs
Additionally, -ddump-to-file effects all other dump flags
Test Plan:
look at the output of using the -th-file flag
and compare it to the output of using -ddump-to-file and -ddump-splices
I want to add test cases, but just need some pointers on getting started there
Reviewers: thomie, goldfire, simonpj, austin
Reviewed By: simonpj, austin
Subscribers: thomie, carter
Differential Revision: https://phabricator.haskell.org/D518
GHC Trac Issues: #8624
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, erikd
Reviewed By: erikd
Subscribers: erikd, carter, thomie
Projects: #ghc
Differential Revision: https://phabricator.haskell.org/D590
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Currently the event manager has a global flag for whether to create
epoll-like notifications as one-shot (e.g. EPOLLONESHOT, where an fd
will be deactivated after its first event) or standard multi-shot
notifications.
Unfortunately this means that the event manager may export either
one-shot or multi-shot semantics to the user. Even worse, the user has
no way of knowing which semantics are being delivered. This resulted in
breakage in the usb[1] library which deadlocks after notifications on
its fd are disabled after the first event is delivered. This patch
reworks one-shot event support to allow the user to choose whether
one-shot or multi-shot semantics are desired on a per-registration
basis. The event manager can then decide whether to use a one-shot or
multi-shot epoll.
A registration is now defined by a set of Events (as before) as well as
a Lifetime (either one-shot or multi-shot). We lend monoidal structure
to Lifetime choosing OneShot as the identity. This allows us to combine
Lifetime/Event pairs of an fd to give the longest desired lifetime of
the registration and the full set of Events for which we want
notification.
[1] https://github.com/basvandijk/usb/issues/7
Test Plan: Add more test cases and validate
Reviewers: tibbe, AndreasVoellmy, hvr, austin
Reviewed By: austin
Subscribers: thomie, carter, simonmar
Differential Revision: https://phabricator.haskell.org/D347
|
|
|
|
| |
Differential Revision: https://phabricator.haskell.org/D617
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The relevant aspect is that the libffi configuration's AC_CHECK_LIB
and AC_CHECK_HEADERS are moved after FIND_GCC. There are two reasons
to do this:
1. We should detect the presence of libffi using the C compiler
that we are eventually going to use to build GHC.
2. Running AC_CHECK_HEADERS before FIND_GCC pollutes the CPP variable
with "gcc -E" (wrong when cross-compiling), and CPP is not reset
by FIND_GCC. Thus this patch fixes x86_64 -> i386 cross-compilation
of integer-gmp2.
Test Plan: Local x86_64 -> i386 cross-compiling validate; Harbormaster
Reviewers: austin
Reviewed By: austin
Subscribers: erikd, carter, thomie
Differential Revision: https://phabricator.haskell.org/D597
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Avoids a confusing inconsistency when testing #9386 (about ghci finding .so files in .).
Test Plan: validate
Reviewers: austin
Reviewed By: austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D593
GHC Trac Issues: #9386
|
|
|
|
| |
In particular about the dcSrcBangs field of an imported DataCon
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D612
GHC Trac Issues: #9960
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
- Add SPECIALIZE pragmas for the lkG/xtG/mapG/fdG family of functions
- Rename wrapEmptyXX to just emptyXX
- New deBruijnize function for initializing DeBruijn elements
- Some extra documentation
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D611
GHC Trac Issues: #9960
|
| |
|
|
|
|
| |
I did a bit of refactoring at the same time, needless to say
|
|
|
|
| |
Fixes Trac #9972
|
|
|
|
|
|
|
| |
Particularly, flatten_many was exported, but the caller was not doing
runFlatten. Moreover it was always used at nominal role.
This patch makes the API clearer, and more robust
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This module is a disorganised mess.
For example, there is literally *no* documentation of what the *seven*
different forms of 'Severity' are intended to connote.
Anyway this patch makes a tiny step by not exporting unused functions
pprMsgBag and isWarning, and a little bit of internal refactoring
|
|
|
|
| |
Previously the caller had do to that, and sometimes forgot
|
|
|
|
|
| |
This fixes Trac #9969, a new crash in T7562 that I somehow missed when
fiddling with HsBang
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The biggest chore is the Eq (DeBrujin a) instances (all the more a chore
because we already have an implementation of them, but a CmEnv is not an
RnEnv2), but otherwise a fairly mechanical transformation.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D609
GHC Trac Issues: #9960
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We need equality over Types, etc; and this equality has to be modulo alpha
renaming. Previously, we baked CmEnv into the generic "empty, singleton, many"
structure. This isn't great, really GenMap should be more generic than that.
The insight: we've defined the key wrong: the key should be *equipped*
with the alpha-renaming information (CmEnv) and a TrieMap queried with this.
This is what the DeBruijn constructor does.
Now, when we define TrieMap instances, we don't have to synthesize an emptyCME
to pass to the helper functions: we have all the information we need. To make a
recursive call, we construct a new DeBruijn with the updated CME and then
call lookupTM on that. We can even define a plain old Eq instance on DeBruijn
respecting alpha-renaming. There are number of other good knock-on effects.
This patch does add a bit of boxing and unboxing, but nothing the optimizer
shouldn't be able to eliminate.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D608
GHC Trac Issues: #9960
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provoked by questions from Johan
- Improve comments, fix misleading stuff
- Add commented synonyms for HsSrcBang, HsImplBang, and use them throughout
- Rename HsUserBang to HsSrcBang
- Rename dataConStrictMarks to dataConSrcBangs
dataConRepBangs to dataConImplBangs
This renaming affects Haddock in a trivial way, hence submodule update
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I still haven't applied the optimization to anything besides TypeMap.
Summary:
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Depends On: D606
Reviewers: simonpj, austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D607
GHC Trac Issues: #9960
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Suppose we have a handful H of entries in a TrieMap, each with a very large
key, size K. If you fold over such a TrieMap you'd expect time O(H). That would
certainly be true of an association list! But with TrieMap we actually have to
navigate down a long singleton structure to get to the elements, so it takes
time O(K*H). The point of a TrieMap is that you need to navigate to the point
where only one key remains, and then things should be fast.
This is a starting point: we can improve the patch by generalizing the
singleton constructor so it applies to CoercionMap and CoreMap; I'll do this
in a later commit.
Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D606
GHC Trac Issues: #9960
|
|
|
|
|
|
|
| |
It's failing reliable for me (as I think it should) and Edward.
See Trac #9938.
Reverts commit 633814f5
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Check that GHC.Real compiles without OPTIMISE_INTEGER_GCD_LCM nor MIN_VERSION_integer_gmp defined.
Reviewers: carter, ezyang, erikd, hvr, dfeuer, austin
Reviewed By: erikd, hvr, dfeuer, austin
Subscribers: erikd, dfeuer, carter, thomie
Differential Revision: https://phabricator.haskell.org/D600
|