summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Further simplify the story around minimum/maximumwip/D1229Joachim Breitner2015-09-071-25/+9
| | | | | | | | | | | | | | | | | | After I have found out that I should look at -ddump-prep and not -ddump-core, I noticed that these days, GHC is perfectly capeable of turning (the equivalent) of foldl to (the equivalent) of foldl' if the operation in question is strict. So instead of using rewrite rules to rewrite maximum to a strictMaximum for certain types, we simply use SPECIALIZE. This also marks maximum/minimum as INLINEABLE, so that client code can get similar specializations, hopefully even automatically. And inded, minimum applied to [Double] produces good code (although due to inlineing, not due to specialization, it seems). I checked (by looking at the core) that this still fixes #10788. Differential revision: https://phabricator.haskell.org/D1229
* SPECIALIZE strictMinimum for Int and IntegerJoachim Breitner2015-09-071-0/+4
| | | | | | | | This fixes a regression reported in #10788, where due to less inlining compared to earlier versions, we’d get worse code. With the SPECIALIZE, we get the good code, and moreover, the good code is in List.hs and _not_ inlined to the use site, so smaller code size and less compilation time.
* Build system: cleanup utils/ghc-pkg/ghc.mkThomas Miedema2015-09-071-17/+31
| | | | | | | | | | | | | | | | | | | | | | | | | There used to be a lot of custom make code to build ghc-pkg with the stage0 compiler. Commit ac5a314504554ddef0e855ef9e2fcf51e961f4a6 thankfully cleaned this up, by using the build settings from the ghc-pkg.cabal file. This commit removes some remains of the old way of installing ghc-pkg when Stage1Only=YES. Notably, we called both `build-prog` as `shell-wrapper`. This is surely wrong, because `build-prog` already calls `shell-wrapper`. It isn't needed to set WANT_INSTALLED_WRAPPER either; build-prog does that for us. This prevents the following warnings when Stage1Only=YES: utils/ghc-pkg/ghc.mk:46: warning: overriding commands for target `install_utils/ghc-pkg_dist_wrapper' utils/ghc-pkg/ghc.mk:37: warning: ignoring old commands for target `install_utils/ghc-pkg_dist_wrapper' Also add more comments and restructure a bit. Reviewed by: austin Differential Revision: https://phabricator.haskell.org/D1063
* Build system: simplify *-llvm BuildFlavours (#10223)Thomas Miedema2015-09-074-10/+10
| | | | | | | | | | | | | Note that SRC_HC_OPTS are added to every Haskell compilation. So there isn't any need to also add `-fllvm` to GhcStage1HcOpts, GhcStage2HcOpts and GhcLibHcOpts. Small bug fix: make sure we test for -fllvm in SRC_HC_OPTS, to check whether the bootstrap compiler is affected by bug #9439. Reviewed by: austin Differential Revision: https://phabricator.haskell.org/D1188
* Build system: put each BuildFlavour in a separate file (#10223)Thomas Miedema2015-09-0717-294/+207
| | | | | | | | | This allows easier diffing of different BuildFlavours, including `mk/flavours/validate.mk`. Reviewed By: bgamari, austin Differential Revision: https://phabricator.haskell.org/D1050
* tracing: Kill EVENT_STARTUPBen Gamari2015-09-056-52/+2
| | | | | This has been unnecessary for quite some time due to the create/delete capability events.
* EventLog: Factor out ensureRoomFor*EventBen Gamari2015-09-051-83/+41
|
* user-guide: Add missing <para> tags around <listitem> bodyBen Gamari2015-09-051-5/+5
| | | | Otherwise this is ill-formed DocBook
* ghc-pkg: don't print ignored errors when verbosity=0Thomas Miedema2015-09-041-7/+9
| | | | | | | Lines like the following are filling up the build logs: binary-0.7.5.0: cannot find any of ["Data/Binary.hi","Data/Binary.p_hi","Data/Binary.dyn_hi"] (ignoring)
* Build system: implement `make install-strip` (#1851)Thomas Miedema2015-09-045-15/+54
| | | | | | Reviewed by: bgamari Differential Revision: https://phabricator.haskell.org/D1209
* Fix T6018th test failureJan Stolarek2015-09-042-3/+1
|
* Make Data.List.foldr1 inlineJoachim Breitner2015-09-033-3/+9
| | | | | | | | | | Previously, foldr1 would be defiend recursively and thus not inline. This is bad, for example, when maximumBy has a strict comparison function: Before the BBP, it was implemented via foldl1, which inlined and yielded good code. With BBP, it goes via foldr1, so we better inline this as well. Fixes #10830. Differential Revision: https://phabricator.haskell.org/D1205
* Testsuite: ignore line number differences in call stacks (#10834)Thomas Miedema2015-09-041-0/+8
| | | | Differential Revision: https://phabricator.haskell.org/D1206
* Testsuite: only print msg when timeout kills process unexpectedlyThomas Miedema2015-09-042-2/+4
| | | | Differential Revision: https://phabricator.haskell.org/D1207
* Testsuite: fix tcfail220 - Maybe is wired-in nowThomas Miedema2015-09-042-10/+10
| | | | | | | | | | | | | | | | | | This fixes validate. 374457809de343f409fbeea0a885877947a133a2 (D202) mentions: "This patch also wires-in Maybe data type". A conflicting definition of a wired-in type in a .hsig file doesn't seem to cause compilation to fail. This is probably a bug, but a small one. Since SPJ in ffc21506894c7887d3620423aaf86bc6113a1071 swept this under the rug, by removing `data Bool a b c d = False` from tcfail220.hsig, I'm going to do the same here. D1098 touches these files, so ezyang can decide whether this problem warrants fixing when doing a rebase. Differential Revision: https://phabricator.haskell.org/D1208
* Accept underscores in the module parser. (Thanks spinda for the fix.)Edward Z. Yang2015-09-031-1/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Add test for T10836 (expected broken)Jan Stolarek2015-09-033-0/+25
|
* Injective type familiesJan Stolarek2015-09-03127-842/+3962
| | | | | | | | | | | | | | | | | | | For details see #6018, Phab:D202 and the wiki page: https://ghc.haskell.org/trac/ghc/wiki/InjectiveTypeFamilies This patch also wires-in Maybe data type and updates haddock submodule. Test Plan: ./validate Reviewers: simonpj, goldfire, austin, bgamari Subscribers: mpickering, bgamari, alanz, thomie, goldfire, simonmar, carter Differential Revision: https://phabricator.haskell.org/D202 GHC Trac Issues: #6018
* Testsuite: delete dead codeThomas Miedema2015-09-021-3/+0
|
* Testsuite: by default run all tests for a single wayThomas Miedema2015-09-0210-30/+64
| | | | | | | | | | | | | | `make test` now runs all tests for a single way only. Use `make slowtest` to get the previous behaviour (i.e. run all tests for all ways). The intention is to use this new `make test` setting for Phabricator, as a reasonable compromise between `make fasttest` (what it previously used) and a fullblown `make slowtest` (which runs all tests for all ways). See Note [validate and testsuite speed] in toplevel Makefile. Differential Revision: https://phabricator.haskell.org/D1178
* Fix some tests that were broken by D861Eric Seidel2015-09-024-29/+31
| | | | | | | | | | I didn't realize that `./validate` does not run every test :( Test Plan: ./validate --slow Update submodule hpc. Differential Revision: https://phabricator.haskell.org/D1204
* Testsuite: mark 4 tests expect_broken_for(#10712, opt_ways)Thomas Miedema2015-09-022-5/+6
| | | | Please revert when #10712 is fixed.
* Testsuite: update expected outputThomas Miedema2015-09-023-0/+9
|
* Testsuite: don't warn about missing specialisationsThomas Miedema2015-09-022-0/+5
| | | | | | | | | They can only occur with `-O`, but we want tests to produce the same output for all test ways. This brings us closer to passing the complete testsuite. Differential Revision: https://phabricator.haskell.org/D1203
* stm: Fix test caseBen Gamari2015-09-021-0/+0
| | | | Updates stm submodule.
* Improve the error messages for class instance errorsSimon Peyton Jones2015-09-0225-461/+497
| | | | | | | | | | Summary: See Note [Displaying potential instances]. Reviewers: austin Subscribers: KaneTW, thomie Differential Revision: https://phabricator.haskell.org/D1176
* Expand declaration QQs first (#10047)Michael Smith2015-09-0210-29/+111
| | | | | | | | | | | | | | | | | | | | | Declaration QuasiQuoters do not cause a group split like $(...) splices, and are run and expanded before other declarations in the group. Resolves the lingering issue with #10047, and fixes broken tests qq007 and qq008. Test Plan: validate Reviewers: goldfire, austin, bgamari Reviewed By: bgamari Subscribers: goldfire, simonpj, thomie, spinda Differential Revision: https://phabricator.haskell.org/D1199 GHC Trac Issues: #10047
* Allow annotations though addTopDecls (#10486)Michael Smith2015-09-025-9/+27
| | | | | | | | | | | | | | | | | | addTopDecls restricts what declarations it can be used to add. Adding annotations via this method works fine with no special changes apart from adding AnnD to the declaration whitelist. Test Plan: validate Reviewers: austin, goldfire, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1201 GHC Trac Issues: #10486
* Use a response file for linker command line arguments #10777Michael Snoyman2015-09-021-2/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, we're constrained to 32k bytes total for command line arguments. When building large projects, this limit can be exceeded. This patch changes GHC to always use response files for linker arguments, a feature first used by Microsoft compilers and added to GCC (over a decade ago). Alternatives here include: * Only use this method on Windows systems * Check the length of the command line arguments and use that to decide whether to use this method I did not pursue either of these, as I believe it would make the patch more likely to break in less tested situations. Test Plan: Confirm that linking still works in general. Ideally: compile a very large project on Windows with this patch. (I am attempting to do that myself now, but having trouble getting the Windows build tool chain up and running.) Reviewers: goldfire, hvr, rwbarton, austin, thomie, bgamari, Phyx Reviewed By: thomie, bgamari, Phyx Subscribers: erikd, awson, #ghc_windows_task_force, thomie Differential Revision: https://phabricator.haskell.org/D1158 GHC Trac Issues: #8596, #10777
* Add test for updating a record with existentially quantified fields.Matthew Pickering2015-09-022-0/+22
| | | | | | | | | | | | Test Plan: ./validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1193
* Fix trac #10413Ben Gamari2015-09-021-2/+5
| | | | | | | | | | | | | | Test Plan: Validate. Reviewers: austin, tibbe, bgamari Reviewed By: tibbe, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1194 GHC Trac Issues: #10413
* Use IP based CallStack in error and undefinedEric Seidel2015-09-0248-269/+409
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch modifies `error`, `undefined`, and `assertError` to use implicit call-stacks to provide better error messages to users. There are a few knock-on effects: - `GHC.Classes.IP` is now wired-in so it can be used in the wired-in types for `error` and `undefined`. - `TysPrim.tyVarList` has been replaced with a new function `TysPrim.mkTemplateTyVars`. `tyVarList` made it easy to introduce subtle bugs when you need tyvars of different kinds. The naive ``` tv1 = head $ tyVarList kind1 tv2 = head $ tyVarList kind2 ``` would result in `tv1` and `tv2` sharing a `Unique`, thus substitutions would be applied incorrectly, treating `tv1` and `tv2` as the same tyvar. `mkTemplateTyVars` avoids this pitfall by taking a list of kinds and producing a single tyvar of each kind. - The types `GHC.SrcLoc.SrcLoc` and `GHC.Stack.CallStack` now live in ghc-prim. - The type `GHC.Exception.ErrorCall` has a new constructor `ErrorCallWithLocation` that takes two `String`s instead of one, the 2nd one being arbitrary metadata about the error (but usually the call-stack). A bi-directional pattern synonym `ErrorCall` continues to provide the old API. Updates Cabal, array, and haddock submodules. Reviewers: nh2, goldfire, simonpj, hvr, rwbarton, austin, bgamari Reviewed By: simonpj Subscribers: rwbarton, rodlogic, goldfire, maoe, simonmar, carter, liyang, bgamari, thomie Differential Revision: https://phabricator.haskell.org/D861 GHC Trac Issues: #5273
* Testsuite: refactoring onlyThomas Miedema2015-09-021-53/+58
| | | | | | | | | | | | | | | | * Rename `platform_wordsize_qualify` to `find_expected_file`, and make it return a filename instead of an (absolute) filepath. * Replace most usages of `qualify` by `in_testdir`. Others usage sites will be deleted in a later commit. These changes will be useful in a later commit, when we'll distinguish between files in the source directory and those in a (newly created) test directory. Reviewed by: austin, bgamari Differential Revision: https://phabricator.haskell.org/D1186
* Anchor type family instances deterministicallyBartosz Nitka2015-08-311-6/+1
| | | | | | | | | | | | | | | | | | | | Summary: This is very similar to D1073. It makes type family instances to be attached to a binding with a least `OccName`, therefore not depending on `Unique` ordering. Test Plan: * this makes `Language.Haskell.Exts.SrcLoc` deterministic * ./validate Reviewers: simonmar, austin, bgamari, simonpj Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1192 GHC Trac Issues: #4012
* Fix typo in pattern synonym documentation.HEADMatthew Pickering2015-08-301-2/+2
| | | | | | | | | | | | | `MkT` is the name of the constructor whilst `T` is the name of the type. Reviewers: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1191 GHC Trac Issues: #10787
* Fix 7.10 validateMatthew Pickering2015-08-301-1/+1
| | | | | | | | | | Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1190
* StgCmmHeap: Re-add check for large static allocationsBen Gamari2015-08-291-0/+9
| | | | | | | This should at least help alleviate the annoyance of #4505. This reintroduces a compile-time check originally added in a278f3f02d09bc32b0a75d4a04d710090cde250f but dropped with the new code generator.
* integer-gmp: optimise bitBigNatHerbert Valerio Riedel2015-08-291-1/+18
| | | | | | | | | | | | | This is a somewhat minor optimisation exploiting the static knowledge of the operands involved allowing to save a few allocations. Reviewers: austin, rwbarton, goldfire, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1179
* ghc-pkg --enable-multi-instance should not complain about case sensitivity.Edward Z. Yang2015-08-291-1/+2
| | | | | | | | | | | | Test Plan: validate Reviewers: simonmar, bgamari, austin Reviewed By: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1177
* Fix identifier parsing in hp2psYuras Shumovich2015-08-292-22/+23
| | | | | | | | | | | | | | | | | Now identifiers can start with a package key, which is a hash, so they may also start with a digit. Identifiers always appear at the beginning of a line, and numbers never appear here, soit's safe to allow identifiers to start with a digit. Test Plan: `concprog002` passes under `threaded2_hT` way Reviewers: austin, bgamari, thomie Reviewed By: austin, bgamari, thomie Differential Revision: https://phabricator.haskell.org/D1175 GHC Trac Issues: #10661
* Dwarf: Produce .dwarf_aranges sectionBen Gamari2015-08-293-21/+77
| | | | | | | | | | Test Plan: Check with `readelf --debug-dump=ranges` Reviewers: scpmw, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1174
* Dwarf: Produce {low,high}_pc attributes for compilation unitsBen Gamari2015-08-292-2/+13
| | | | | | | | | | | | | Some libraries (e.g. elfutils) need these otherwise they ignore our DWARF annotations. Test Plan: Test with elfutils' `readelf --debug-dump=cu_index` Reviewers: scpmw, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1173
* Dwarf: Fix DW_AT_use_UTF8 attributeBen Gamari2015-08-292-5/+6
| | | | | | | | | | | | | Previously this was given in the body but not in the abbreviation table. Who knows what sort of havoc this was wrecking. Test Plan: Verify against DWARF4 specification Reviewers: scpmw, austin Subscribers: Tarrasch, thomie Differential Revision: https://phabricator.haskell.org/D1172
* Respect GHC_CHARENC environment variable #10762Michael Snoyman2015-08-291-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only supports UTF-8 as a value right now. I expect some discussion to go on around the naming of this variable and whether it's valid to backport it to GHC 7.10 (which would be my preference). The motivation here is that, when capturing the output of GHC to a file, we often want to ensure that the output is UTF-8, regardless of the actual character encoding of the terminal/console. On the other hand, we don't want to necessary change the terminal/console encoding. The reason being: * On Windows, this requires a global-esque change to the console codepage, which adversely affects other processes in the same console * On all OSes, this can break features like smart quote auto-detection. Test Plan: Set LANG to C, GHC_CHARENC to UTF-8, and compile a Haskell source file with a non-ASCII warning produced. The output who include the UTF-8 sequence instead of replacing it with ?. Reviewers: austin, rwbarton, bgamari Reviewed By: bgamari Subscribers: hsyl20, thomie Differential Revision: https://phabricator.haskell.org/D1167 GHC Trac Issues: #10762
* Make Generic (Proxy t) instance poly-kinded (fixes #10775)RyanGlScott2015-08-292-19/+22
| | | | | | | | | | | | | | | | | | | | | | | This amounts to enabling PolyKinds in GHC.Generics. However, explicit kind signatures must be applied to the datatypes and typeclasses in GHC.Generics to ensure that the Core which TcGenGenerics generates is properly kinded. Several of the typeclasses in GHC.Generics could be poly-kinded, but this differential does not attempt to address this, since D493 already addresses this. Test Plan: ./validate Reviewers: hvr, austin, dreixel, bgamari Reviewed By: austin, dreixel, bgamari Subscribers: goldfire, thomie Differential Revision: https://phabricator.haskell.org/D1166 GHC Trac Issues: #10775
* Add testcase for #7411Ben Gamari2015-08-293-0/+8
|
* RTS: Reduce MBLOCK_SPACE_SIZE on AArch64Erik de Castro Lopo2015-08-291-0/+5
| | | | | | | | | | | | | | | | | | | Commit 0d1a8d09f4 added a two step allocator for 64 bit systems. This allocator mmaps a huge (1 TB) chunk of memory out of which it does smaller allocations. On AArch64/Arm64 linux, this mmap was failing due to the Arm64 Linux kernel parameter CONFIG_ARM64_VA_BITS defaulting to 39 bits. Therefore reducing the AArch64 value for MBLOCK_SPACE_SIZE to make this allocation 1/4 TB while remaining 1 TB for other archs. Reviewers: ezyang, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1171 GHC Trac Issues: #10682
* base: Remove a redundant 'return'Simon Peyton Jones2015-08-271-2/+1
|
* TysWiredIn: Shuffle code aroundBen Gamari2015-08-271-73/+71
|
* MkIface: Introduce PatSynId, ReflectionId, DefMethIdBen Gamari2015-08-272-3/+29
| | | | | Currently we don't persist these three "advisory" IdInfos through interface files. We easily could if needed.