summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a terrible bug in the canonicaliser which led to an infinite loopSimon Peyton Jones2015-01-163-18/+49
| | | | | | This fixes Trac #9971 Merge into the 7.10 branch
* Repsect the package name when checking for self-importSimon Peyton Jones2015-01-163-1/+15
| | | | | | | | 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?
* Add Eq, Ord, Show, and Read instances for ConstFumiaki Kinoshita2015-01-142-4/+13
| | | | | | | | | | | | | | | | | | | | | | 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
* Test Trac #5821Simon Peyton Jones2015-01-144-2/+14
| | | | And rename the wrongly named rebindable/T5821 to T5908 (Trac #5908)
* Refactor handling of SPECIALISE pragmas (Trac #5821)Simon Peyton Jones2015-01-145-91/+193
| | | | | | | | | | | | 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.
* Tiny refactoring (shorter, simpler code)Simon Peyton Jones2015-01-141-4/+3
|
* Tighten up constraint solve order for RULESSimon Peyton Jones2015-01-143-158/+191
| | | | | | | | | | | | 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.
* Correct typos in comments to mkDataConSimon Peyton Jones2015-01-141-2/+2
|
* Optimise scavenge_large_srt_bitmapSimon Marlow2015-01-131-12/+22
| | | | | | | | | | | 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.
* Compile the RTS with -g by defaultSimon Marlow2015-01-131-1/+1
| | | | | Having debugging info doesn't hurt performance, can be stripped from binaries, and it's useful for debugging and profiling.
* Allow the linker to run concurrently with the GCSimon Marlow2015-01-133-2/+16
|
* Improve documentation for -N and -qa (#9890)Simon Marlow2015-01-131-14/+40
|
* Dwarf generation fixed pt 2Peter Wortmann2015-01-134-16/+29
| | | | | | | | | - 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!
* Fix panics of PartialTypeSignatures combined with extensionsThomas Winant2015-01-138-2/+40
| | | | | | | | | | | | | | | | | | | 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
* Trac #9878: Have StaticPointers support dynamic loading.Alexander Vershilov2015-01-138-36/+113
| | | | | | | | | | | | | | | | | | | | | | | 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
* Package environmentsEdsko de Vries2015-01-135-13/+234
| | | | | | | | | | | | 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
* add -th-file which generates a th.hs fileGreg Weber2015-01-1330-67/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* aclocal.m4: fix == bashism in FIND_LLVM_PROGTuncer Ayaz2015-01-131-1/+1
| | | | | | | | | | | | Reviewers: austin, erikd Reviewed By: erikd Subscribers: erikd, carter, thomie Projects: #ghc Differential Revision: https://phabricator.haskell.org/D590
* Event Manager: Make one-shot a per-registration propertyBen Gamari2015-01-125-108/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update Cabal submodule to latest 1.22.0.1 snapshotHerbert Valerio Riedel2015-01-121-0/+0
| | | | Differential Revision: https://phabricator.haskell.org/D617
* Move libffi configuration after basic toolchain setupReid Barton2015-01-121-56/+56
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* inplace: Don't add empty component to LD_LIBRARY_PATH when it is emptyReid Barton2015-01-121-2/+2
| | | | | | | | | | | | | | | | 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
* More comments on HsBangSimon Peyton Jones2015-01-115-36/+58
| | | | In particular about the dcSrcBangs field of an imported DataCon
* Update pretty submodule to 1.1.2.0 releaseHerbert Valerio Riedel2015-01-102-1/+1
|
* Newtype CoreMap and TypeMap so their keys are user-friendly.Edward Z. Yang2015-01-092-90/+122
| | | | | | | | | | | | | | 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
* Inline all of the .*[TCE] methods, and then rename .*[TCE]X to vacated name.Edward Z. Yang2015-01-091-180/+183
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Miscellaneous improvements to TrieMap, from D608 code review.Edward Z. Yang2015-01-091-48/+74
| | | | | | | | | | | | | | | | | | | | | | | 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
* Fix Trac #9973 (buglet in -fwarn-redundant-constraints)Simon Peyton Jones2015-01-093-14/+44
|
* Pattern synonym names need to be in scope before renaming bindings (#9889)Dr. ERDI Gergo2015-01-0913-122/+188
| | | | I did a bit of refactoring at the same time, needless to say
* Fix up test for T7861Simon Peyton Jones2015-01-093-3/+12
| | | | Fixes Trac #9972
* A little tidying up in the flattenerSimon Peyton Jones2015-01-094-152/+166
| | | | | | | 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
* Comments onlySimon Peyton Jones2015-01-093-0/+4
|
* Pattern synonyms do work in GHCi now (see #9900)Dr. ERDI Gergo2015-01-091-2/+1
|
* Update syntax of pattern synonym type signature in documentation (fixes #9967)Dr. ERDI Gergo2015-01-091-2/+3
|
* A little tidying up in ErrUtilsSimon Peyton Jones2015-01-091-36/+23
| | | | | | | | | | 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
* Make TcRnMonad.reportWarning call makeIntoWarningSimon Peyton Jones2015-01-095-15/+20
| | | | Previously the caller had do to that, and sometimes forgot
* Return a [HsImplBang] from dataConImplBangs even with NoDataConRepSimon Peyton Jones2015-01-091-3/+4
| | | | | This fixes Trac #9969, a new crash in T7562 that I somehow missed when fiddling with HsBang
* Apply GenMap to CoreMap and CoercionMap.Edward Z. Yang2015-01-081-79/+183
| | | | | | | | | | | | | | | | | | | 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
* Add 'DeBruijn' constructor, which generalizes "key modulo alpha-renaming."Edward Z. Yang2015-01-082-114/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Recenter T6048 performance numbersJoachim Breitner2015-01-081-1/+2
|
* Bump haddock.base according to whats observed on ghcspeedJoachim Breitner2015-01-081-1/+2
|
* Improve HsBangSimon Peyton Jones2015-01-0815-89/+118
| | | | | | | | | | | | 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
* Spelling error in commentSimon Peyton Jones2015-01-081-1/+1
|
* Improve documentation of -fwarn-redundant-constraintsSimon Peyton Jones2015-01-081-4/+19
|
* Fix out of date comment.Edward Z. Yang2015-01-071-1/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Generalize TrieMap compression to GenMap.Edward Z. Yang2015-01-071-49/+154
| | | | | | | | | | | | | | | | | 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
* Compress TypeMap TrieMap leaves with singleton constructor.Edward Z. Yang2015-01-072-2/+60
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Mark T9938 as expect_broken againSimon Peyton Jones2015-01-071-1/+1
| | | | | | | It's failing reliable for me (as I think it should) and Edward. See Trac #9938. Reverts commit 633814f5
* Fix stderr for T9939Simon Peyton Jones2015-01-071-1/+18
|
* Fix undefined GHC.Real export with integer-simpleErik de Castro Lopo2015-01-071-1/+1
| | | | | | | | | | | | 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