summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* base: Various haddock fixeswip/haddock-fixesBen Gamari2019-10-302-5/+5
| | | | Just a few things I found while looking at #17383.
* gitlab-ci: Fix the ARMv7 tripleBen Gamari2019-10-301-1/+1
| | | | | | | | | | Previously we were configuring the ARMv7 builds with a host/target triple of arm-linux-gnueabihf, which caused us to target ARMv6 and consequently rely on the old CP15 memory barrier implementation. This barrier has to be emulated on ARMv8 machines which is glacially slow. Hopefully this should fix the ARMv7 builds which currently consistently time out.
* Whitespace forward compatibility for proposal #229Vladislav Zavialov2019-10-3016-47/+27
| | | | | | | | GHC Proposal #229 changes the lexical rules of Haskell, which may require slight whitespace adjustments in certain cases. This patch changes formatting in a few places in GHC and its testsuite in a way that enables it to compile under the proposed rules.
* rts: More aarch64 header fixesBen Gamari2019-10-305-7/+10
|
* Interpreter: initialize arity fields of AP_NOUPDsÖmer Sinan Ağacan2019-10-291-4/+4
| | | | | | AP_NOUPD entry code doesn't use the arity field, but not initializing this field confuses printers/debuggers, and also makes testing harder as the field's value changes randomly.
* gitlab-ci: Fix binary distribution testingBen Gamari2019-10-291-20/+20
|
* Don't include settings file in binary distributionBen Gamari2019-10-291-1/+1
| | | | | | | | The configuration in the installation environment (as determined by `autoconf`) may differ from the build environment and therefore we need to be sure to rebuild the settings file. Fixes #17374.
* gitlab-ci: Use pxz to compress binary distributionsBen Gamari2019-10-292-1/+2
|
* distrib: Fix binary distribution installationBen Gamari2019-10-293-4/+6
| | | | | This had silently regressed due to 81860281 and the variable renaming performed in b55ee979, as noted in #17374.
* Revert "Replace freebsd-gnueabihf with freebsd"Ben Gamari2019-10-293-4/+8
| | | | | This reverts commit aa31ceaf7568802590f73a740ffbc8b800096342 as suggested in #17392.
* Don't substitute GccVersion variableBen Gamari2019-10-292-4/+2
| | | | | Not only is it now unused but we generally can't assume that we are compiling with GCC, so it really shouldn't be used.
* base: Split up file locking implementationBen Gamari2019-10-298-284/+352
| | | | This makes the CPP significantly easier to follow.
* base: Fix open-file lockingBen Gamari2019-10-292-19/+40
| | | | | | | | | The OFD locking path introduced in 3b784d440d4b01b4c549df7c9a3ed2058edfc780 due to #13945 appears to have never actually worked but we never noticed due to an oversight in the autoconf check. Fix it. Thanks to Oleg Grenrus for noticing this.
* hadrian: Drop -Werror=unused-but-set-variable from GHC flagsBen Gamari2019-10-291-3/+1
| | | | | | | | | | | Previously `hadrian` would pass `-optc-Werror=unused-but-set-variable` to all GHC invocations. This was a difference from the make build system and cause the unregisterised build to fail as the C that GHC produces contains many unused functions. Drop it from the GHC flags. Note, however, that the flag is still present in `Settings.Builders.Common.cWarnings` and therefore will still be applied during compilation of C sources.
* hadrian: Shuffle around RTS build flagsBen Gamari2019-10-291-10/+19
| | | | | Some of these flags wanted to be passed to .cmm builds as well as C builds.
* hadrian: Define NOSMP when building rts unregisterisedBen Gamari2019-10-296-15/+54
| | | | | | | | It seems that NOSMP was previously only defined when compiling the compiler, not the RTS. Fix this. In addition do some spring-cleaning and make the logic match that of the Make build system.
* hadrian: Define USE_LIBFFI_FOR_ADJUSTORS when necessaryBen Gamari2019-10-291-0/+2
|
* gitlab-ci: Factor out Linux Hadrian validation logicBen Gamari2019-10-291-3/+6
|
* gitlab-ci: Use Hadrian for unregisterised jobBen Gamari2019-10-291-7/+7
|
* MkIface: Remove redundant parameter and outdated comments from addFingerprintsÖmer Sinan Ağacan2019-10-291-8/+8
|
* HscMain: Move a comment closer to the relevant siteÖmer Sinan Ağacan2019-10-291-4/+4
|
* Remove unused DynFlags arg of lookupIfaceByModuleÖmer Sinan Ağacan2019-10-296-17/+12
|
* Return ModIface in compilation pipeline, remove IORef hack for generating ↵Ömer Sinan Ağacan2019-10-294-97/+114
| | | | | | | | | | | | | | | | | | | | | ModIfaces The compilation phases now optionally return ModIface (for phases that generate an interface, currently only HscOut when (re)compiling a file). The value is then used by compileOne' to return the generated interface with HomeModInfo (which is then used by the batch mode compiler when building rest of the tree). hscIncrementalMode also returns a DynFlags with plugin info, to be used in the rest of the pipeline. Unfortunately this introduces a (perhaps less bad) hack in place of the previous IORef: we now record the DynFlags used to generate the partial infterface in HscRecomp and use the same DynFlags when generating the full interface. I spent almost three days trying to understand what's changing in DynFlags that causes a backpack test to fail, but I couldn't figure it out. There's a FIXME added next to the field so hopefully someone who understands this better than I do will fix it leter.
* Refactor HscRecomp constructors:Ömer Sinan Ağacan2019-10-293-47/+45
| | | | | | | | | | | Make it evident in the constructors that the final interface is only available when HscStatus is not HscRecomp. (When HscStatus == HscRecomp we need to finish the compilation to get the final interface) `Maybe ModIface` return value of hscIncrementalCompile and the partial `expectIface` function are removed.
* testsuite: Fix quoting of $(TEST_HC) in T12674Ben Gamari2019-10-291-2/+2
| | | | I have no idea how this went unnoticed until now.
* linters: Add linter to catch unquoted use of $(TEST_HC)Ben Gamari2019-10-291-4/+16
| | | | This is a common bug that creeps into Makefiles (e.g. see T12674).
* linters: Add mode to lint given set of filesBen Gamari2019-10-292-5/+16
| | | | This makes testing much easier.
* Use `not#` primitive to implement Word's complementSylvain Henry2019-10-291-3/+1
|
* users-guide: Add some new features and fix warnings for GHC 8.10Takenobu Tani2019-10-292-9/+17
| | | | | | | | | | This updates the following: * Add description for ImportQualifiedPost extension * Add description for ghci command name resolution * Fix markdown warnings [skip ci]
* users-guide: Fix :since: for -xn flagTakenobu Tani2019-10-291-1/+1
| | | | [skip ci]
* Better arity for join pointsSimon Peyton Jones2019-10-287-24/+49
| | | | | | A join point was getting too large an arity, leading to #17294. I've tightened up the invariant: see CoreSyn, Note [Invariants on join points], invariant 2b
* Use FlexibleInstances for `Outputable (* p)` instead of match-all instances ↵Sebastian Graf2019-10-2817-205/+209
| | | | | | | | | | | | | | with equality constraints In #17304, Richard and Simon dicovered that using `-XFlexibleInstances` for `Outputable` instances of AST data types means users can provide orphan `Outputable` instances for passes other than `GhcPass`. Type inference doesn't currently to suffer, and Richard gave an example in #17304 that shows how rare a case would be where the slightly worse type inference would matter. So I went ahead with the refactoring, attempting to fix #17304.
* Attach API Annotations for {-# SOURCE #-} import pragmaAlan Zimmerman2019-10-285-14/+61
| | | | | | | Attach the API annotations for the start and end locations of the {-# SOURCE #-} pragma in an ImportDecl. Closes #17388
* Refactor TcDeriv to validity-check less in anyclass/via deriving (#13154)Ryan Scott2019-10-289-301/+622
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the way `DerivEnv` is currently structured, there is an invariant that every derived instance must consist of a class applied to a non-empty list of argument types, where the last argument *must* be an application of a type constructor to some arguments. This works for many cases, but there are also some design patterns in standalone `anyclass`/`via` deriving that are made impossible due to enforcing this invariant, as documented in #13154. This fixes #13154 by refactoring `TcDeriv` and friends to perform fewer validity checks when using the `anyclass` or `via` strategies. The highlights are as followed: * Five fields of `DerivEnv` have been factored out into a new `DerivInstTys` data type. These fields only make sense for instances that satisfy the invariant mentioned above, so `DerivInstTys` is now only used in `stock` and `newtype` deriving, but not in other deriving strategies. * There is now a `Note [DerivEnv and DerivSpecMechanism]` describing the bullet point above in more detail, as well as explaining the exact requirements that each deriving strategy imposes. * I've refactored `mkEqnHelp`'s call graph to be slightly less complicated. Instead of the previous `mkDataTypeEqn`/`mkNewTypeEqn` dichotomy, there is now a single entrypoint `mk_eqn`. * Various bits of code were tweaked so as not to use fields that are specific to `DerivInstTys` so that they may be used by all deriving strategies, since not all deriving strategies use `DerivInstTys`.
* Fix #15344: use fail when desugaring applicative-doJosef Svenningsson2019-10-2816-68/+390
| | | | | | | | | | | | | | | | Applicative-do has a bug where it fails to use the monadic fail method when desugaring patternmatches which can fail. See #15344. This patch fixes that problem. It required more rewiring than I had expected. Applicative-do happens mostly in the renamer; that's where decisions about scheduling are made. This schedule is then carried through the typechecker and into the desugarer which performs the actual translation. Fixing this bug required sending information about the fail method from the renamer, through the type checker and into the desugarer. Previously, the desugarer didn't have enough information to actually desugar pattern matches correctly. As a side effect, we also fix #16628, where GHC wouldn't catch missing MonadFail instances with -XApplicativeDo.
* hadrian: Silence output from Support SMP checkBen Gamari2019-10-271-1/+1
| | | | | | | Previously we would allow the output from the check of SMP support introduced by 83655b06e6d3e93b2d15bb0fa250fbb113d7fe68 leak to stdout. Silence this. See #16873.
* Parenthesize nullary constraint tuples using sigPrec (#17403)Ryan Scott2019-10-275-1/+13
| | | | | | | | | We were using `appPrec`, not `sigPrec`, as the precedence when determining whether or not to parenthesize `() :: Constraint`, which lead to the parentheses being omitted in function contexts like `(() :: Constraint) => String`. Easily fixed. Fixes #17403.
* Remove documented flags from expected-undocumented-flags.txtLuke Lau2019-10-271-10/+0
|
* Add back documentation for deprecated -Whi-shadowingLuke Lau2019-10-271-0/+17
| | | | | | This was removed in b538476be3706264620c072e6e436debf9e0d3e4, but without it the compare-flags.py script fails. This adds it back and marks it as deprecated, with a notice that it is slated for removal.
* Fix path to ghc-flags in users guide Hadrian rulesLuke Lau2019-10-271-2/+2
| | | | It should point to the _build directory, not the source
* Remove unused importLuke Lau2019-10-271-1/+0
|
* Fix RankNTypes :ghc-flag: in users guideLuke Lau2019-10-271-2/+2
| | | | This fixes a hadrian `build docs` failure
* Remove redundant -fno-cse optionsÖmer Sinan Ağacan2019-10-264-9/+1
| | | | | These were probably added with some GLOBAL_VARs, but those GLOBAL_VARs are now gone.
* rts: Fix ARM linker includesBen Gamari2019-10-266-17/+7
| | | | | | | * Prefer #pragma once over guard macros * Drop redundant #includes * Fix order to ensure that necessary macros are defined when we condition on them
* Enable PDF documentationBen Gamari2019-10-261-4/+0
|
* testsuite: Skip regalloc_unit_tests unless have_ncgBen Gamari2019-10-261-0/+1
| | | | | This is a unit test for the native code generator's register allocator; naturally. the NCG is required.
* gitlab-ci: Produce ARMv7 binary distributionsBen Gamari2019-10-261-0/+36
|
* hadrian: point link to ghc gitlabAdam Sandberg Eriksson2019-10-261-1/+1
| | | | [skip ci]
* Fix #14690 - :steplocal panics after break-on-errorRoland Senn2019-10-266-1/+27
| | | | | | | | | | | | | | `:steplocal` enables only breakpoints in the current top-level binding. When a normal breakpoint is hit, then the module name and the break id from the `BRK_FUN` byte code allow us to access the corresponding entry in a ModBreak table. From this entry we then get the SrcSpan (see compiler/main/InteractiveEval.hs:bindLocalsAtBreakpoint). With this source-span we can then determine the current top-level binding, needed for the steplocal command. However, if we break at an exception or at an error, we don't have an BRK_FUN byte-code, so we don't have any source information. The function `bindLocalsAtBreakpoint` creates an `UnhelpfulSpan`, which doesn't allow us to determine the current top-level binding. To avoid a `panic`, we have to check for `UnhelpfulSpan` in the function `ghc/GHCi/UI.hs:stepLocalCmd`. Hence a :steplocal command after a break-on-exception or a break-on-error is not possible.
* Implement shrinkSmallMutableArray# and resizeSmallMutableArray#.Andrew Martin2019-10-2612-6/+189
| | | | | | | | | | | | | | | | | | | | | This is a part of GHC Proposal #25: "Offer more array resizing primitives". Resources related to the proposal: - Discussion: https://github.com/ghc-proposals/ghc-proposals/pull/121 - Proposal: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0025-resize-boxed.rst Only shrinkSmallMutableArray# is implemented as a primop since a library-space implementation of resizeSmallMutableArray# (in GHC.Exts) is no less efficient than a primop would be. This may be replaced by a primop in the future if someone devises a strategy for growing arrays in-place. The library-space implementation always copies the array when growing it. This commit also tweaks the documentation of the deprecated sizeofMutableByteArray#, removing the mention of concurrency. That primop is unsound even in single-threaded applications. Additionally, the non-negativity assertion on the existing shrinkMutableByteArray# primop has been removed since this predicate is trivially always true.