summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* base: Fix <unistd.h> #includeBen Gamari2019-12-021-2/+2
| | | | | | | Previously we were including <sys/unistd.h> which is available on glibc but not musl. (cherry picked from commit e44b695ca7cb5f3f99eecfba05c9672c6a22205e)
* gitlab-ci: Disable Sphinx build on Debian 8Ben Gamari2019-12-021-0/+6
| | | | | | | The docutils version available appears to be too old to support the `table` directive's `:widths:` options. (cherry picked from commit 75764487a96a7a026948b5af5022781872d12baa)
* win32-init: Drop workaround for #17480Ben Gamari2019-12-021-2/+0
| | | | | | The `process` changes have now been merged into `hsc2hs`. (cherry picked from commit fa029f53132ad59f847ed012d3b835452cf16615)
* gitlab-ci: Fix changelog linting logicBen Gamari2019-12-021-1/+1
|
* Simplify: Fix pretty-printing of strictnessBen Gamari2019-12-021-2/+2
| | | | | | A colleague recently hit the panic in Simplify.addEvals and I noticed that the message is quite unreadable due to incorrect pretty-printing. Fix this.
* More Haddock syntax in GHC.Hs.UtilsBen Gamari2019-12-021-15/+16
| | | | As suggested by RyanGlScott in !2163.
* Fix more typosBrian Wignall2019-12-0234-35/+35
|
* API Annotations: Unicode '->' on HsForallTyAlan Zimmerman2019-12-025-1/+38
| | | | | | | | | | | The code fragment type family Proxy2' ∷ ∀ k → k → Type where Proxy2' = Proxy' Generates AnnRarrow instead of AnnRarrowU for the first →. Fixes #17519
* Convert warnings into assertionsKrzysztof Gogolewski2019-12-022-4/+4
| | | | | Since the invariants always hold in the testsuite, we can convert them to asserts.
* testsuite: Don't override LD_LIBRARY_PATH, only prependBen Gamari2019-12-021-1/+1
| | | | | | NixOS development environments often require that LD_LIBRARY_PATH be set in order to find system libraries. T1407 was overriding LD_LIBRARY_PATH, dropping these directories. Now it merely prepends, its directory.
* testsuite: Fix location of typing_stubs moduleBen Gamari2019-12-022-13/+23
| | | | This should fix the build on Debian 8.
* Update DisambECP-related commentsVladislav Zavialov2019-12-011-112/+36
|
* Improve tests for #17171Roland Senn2019-11-302-6/+5
| | | | | | | | | | | | | | | While backporting MR !1806 to 8.8.2 (!1885) I learnt the following: * Tests with `expect_fail` do not compare `*.stderr` output files. So a test using `expect_fail` will not detect future regressions on the `stderr` output. * To compare the `*.stderr` output files, I have to use the `exit_code(n)` function. * When a release is made, tests with `makefile_test` are converted to use `run_command`. * For the test `T17171a` the return code is `1` when running `makefile_test`, however it's `2` when running `run_command`. Therefore I decided: * To improve my tests for #17171 * To change test T17171a from `expect_fail` to `exit_code(2)` * To change both tests from `makefile_test` to `run_command`
* Simpler Semigroup instance for InsideLam and InterestingCtxtSebastian Graf2019-11-301-6/+4
| | | | | This mirrors the definition of `(&&)` and `(||)` now, relieving the Simplifier of a marginal amount of pressure.
* Use Hadrian by default in validate script (#17527)Sylvain Henry2019-11-301-7/+9
|
* Remove HasSrcSpan (#17494)Vladislav Zavialov2019-11-3052-1599/+1440
| | | | | Metric Decrease: haddock.compiler
* Hadrian docs: Rename the second "validate" entry to "slow-validate" [ci skip]Sebastian Graf2019-11-301-1/+1
| | | | That would be in line with the implementation.
* Improve few Foreign.Marshal.Utils docsÖmer Sinan Ağacan2019-11-291-11/+21
| | | | | | | | In copyBytes and moveBytes mention which argument is source and which is destination. Also fixes some of the crazy indentation in the module and cleans trailing whitespace.
* Pass ModDetails with (partial) ModIface in HscStatusÖmer Sinan Ağacan2019-11-294-46/+51
| | | | | | | | | | (Partial) ModIface and ModDetails are generated at the same time, but they're passed differently: ModIface is passed in HscStatus consturctors while ModDetails is returned in a tuple. This refactors ModDetails passing so that it's passed around with ModIface in HscStatus constructors. This makes the code more consistent and hopefully easier to understand: ModIface and ModDetails are really very closely related. It makes sense to treat them the same way.
* Factor out HsSCC/HsCoreAnn/HsTickPragma into HsPragEwip/hs-pragVladislav Zavialov2019-11-2816-183/+169
| | | | | | | | | | | | | | | | | | | | | | | This is a refactoring with no user-visible changes (except for GHC API users). Consider the HsExpr constructors that correspond to user-written pragmas: HsSCC representing {-# SCC ... #-} HsCoreAnn representing {-# CORE ... #-} HsTickPragma representing {-# GENERATED ... #-} We can factor them out into a separate datatype, HsPragE. It makes the code a bit tidier, especially in the parser. Before this patch: hpc_annot :: { Located ( (([AddAnn],SourceText),(StringLiteral,(Int,Int),(Int,Int))), ((SourceText,SourceText),(SourceText,SourceText)) ) } After this patch: prag_hpc :: { Located ([AddAnn], HsPragE GhcPs) }
* Fix endian handling of LLVM backendStefan Schulze Frielinghaus2019-11-281-10/+4
| | | | | Get rid of CPP macro WORDS_BIGENDIAN which is not defined anymore, and replace it by DynFlag. This fixes partially #17337.
* Fix typos, using Wikipedia list of common typosBrian Wignall2019-11-28121-160/+160
|
* Reduce boolean blindness in OccInfo(OneOcc) #17482Philipp Krüger2019-11-285-56/+86
| | | | | | | | | | | | | * Transformed the type aliases `InterestingCxt`, `InsideLam` and `OneBranch` into data types. * Added Semigroup and Monoid instances for use in orOccInfo in OccurAnal.hs * Simplified some usage sites by using pattern matching instead of boolean algebra. Metric Increase: T12150 This increase was on a Mac-build of exactly 1%. This commit does *not* re-intruduce the asymptotic memory usage described in T12150.
* .gitmodules: tweak 'exception' URL to avoid redirection warningsSergei Trofimovich2019-11-271-1/+1
| | | | | | | | | | | Avoid initial close warning of form: ``` Cloning into 'exceptions'... warning: redirecting to https://gitlab.haskell.org/ghc/packages/exceptions.git/ ``` Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Fix @since annotations for isResourceVanishedError and friends (#17488)Ryan Scott2019-11-271-3/+3
|
* Whitespace-sensitive bang patterns (#1087, #17162)wip/whitespace-and-lookaheadVladislav Zavialov2019-11-27172-742/+937
| | | | | | | | | | | | | | | | | | This patch implements a part of GHC Proposal #229 that covers five operators: * the bang operator (!) * the tilde operator (~) * the at operator (@) * the dollar operator ($) * the double dollar operator ($$) Based on surrounding whitespace, these operators are disambiguated into bang patterns, lazy patterns, strictness annotations, type applications, splices, and typed splices. This patch doesn't cover the (-) operator or the -Woperator-whitespace warning, which are left as future work.
* Make warnings for TH splices opt-inSebastian Graf2019-11-2710-88/+168
| | | | | | | | | | | | | | | | | | | | | | | In #17270 we have the pattern-match checker emit incorrect warnings. The reason for that behavior is ultimately an inconsistency in whether we treat TH splices as written by the user (`FromSource :: Origin`) or as generated code (`Generated`). This was first reported in #14838. The current solution is to TH splices as `Generated` by default and only treat them as `FromSource` when the user requests so (-fenable-th-splice-warnings). There are multiple reasons for opt-in rather than opt-out: * It's not clear that the user that compiles a splice is the author of the code that produces the warning. Think of the situation where she just splices in code from a third-party library that produces incomplete pattern matches. In this scenario, the user isn't even able to fix that warning. * Gathering information for producing the warnings (pattern-match check warnings in particular) is costly. There's no point in doing so if the user is not interested in those warnings. Fixes #17270, but not #14838, because the proper solution needs a GHC proposal extending the TH AST syntax.
* Remove prefix arrow support for GADTs (#17211)Krzysztof Gogolewski2019-11-253-23/+0
| | | | | | | This reverts the change in #9096. The specialcasing done for prefix (->) is brittle and does not support VTA, type families, type synonyms etc.
* configure: Fix HAVE_C11_ATOMICS macroBen Gamari2019-11-241-1/+3
| | | | | | | | Previously we were using AC_DEFINE instead of AC_DEFINE_UNQUOTED, resulted in the variable not being interpolated. Fixes #17505.
* On FreeBSD 12 sys/sysctl.h requires sys/types.hViktor Dukhovni2019-11-241-0/+1
| | | | | | | | | | | | | | Else build fails with: In file included from ExecutablePath.hsc:42: /usr/include/sys/sysctl.h:1062:25: error: unknown type name 'u_int'; did you mean 'int'? int sysctl(const int *, u_int, void *, size_t *, const void *, size_t); ^~~~~ int compiling libraries/base/dist-install/build/System/Environment/ExecutablePath_hsc_make.c failed (exit code 1) Perhaps also also other FreeBSD releases, but additional include will no harm even if not needed.
* Fix typosBrian Wignall2019-11-2336-55/+54
|
* Bump exceptions submoduleÖmer Sinan Ağacan2019-11-231-0/+0
| | | | Adds a few files generated by GHC's configure script to .gitignore
* Stricten functions ins GHC.NaturalSebastian Graf2019-11-234-36/+63
| | | | | This brings `Natural` on par with `Integer` and fixes #17499. Also does some manual CSE for 0 and 1 literals.
* Packages: Don't use expectJustBen Gamari2019-11-231-5/+8
| | | | | Throw a slightly more informative error on failure. Motivated by the errors seen in !2160.
* rts: Consolidate spinlock implementationBen Gamari2019-11-231-47/+13
| | | | | Previously we had two distinct implementations: one with spinlock profiling and another without. This seems like needless duplication.
* Bump ghc version to 8.11Ben Gamari2019-11-232-1/+1
|
* Prevent -optc arguments from being duplicated in reverse order (#17471)Ryan Scott2019-11-235-3/+22
| | | | | | | | | | | | | | | | | This reverts a part of commit 7bc5d6c6578ab9d60a83b81c7cc14819afef32ba that causes all arguments to `-optc` (and `-optcxx`) to be passed twice to the C/C++ compiler, once in reverse order and then again in the correct order. While passing duplicate arguments is usually harmless it can cause breakage in this pattern, which is employed by Hackage libraries in the wild: ``` ghc Foo.hs foo.c -optc-D -optcFOO ``` As `FOO -D -D FOO` will cause compilers to error. Fixes #17471.
* Make CorePrep.tryEtaReducePrep and CoreUtils.tryEtaReduce line upMatheus Magalhães de Alcantara2019-11-232-20/+10
| | | | | | | Simon PJ says he prefers this fix to #17429 over banning eta-reduction for jumps entirely. Sure enough, this also works. Test case: simplCore/should_compile/T17429.hs
* Take care to not eta-reduce jumps in CorePrepMatheus Magalhães de Alcantara2019-11-233-2/+30
| | | | | | | | | | | | | | CorePrep already had a check to prevent it from eta-reducing Ids that respond true to hasNoBinding (foreign calls, constructors for unboxed sums and products, and Ids with compulsory unfoldings). It did not, however, consider join points as ids that 'must be saturated'. Checking whether the Id responds True to 'isJoinId' should prevent CorePrep from turning saturated jumps like the following (from #17429) into undersaturated ones: (\ eta_XP -> join { mapped_s1vo _ = lvl_s1vs } in jump mapped_s1vo eta_XP)
* rts: Expose interface for configuring EventLogWritersBen Gamari2019-11-2311-50/+195
| | | | | | This exposes a set of interfaces from the GHC API for configuring EventLogWriters. These can be used by consumers like [ghc-eventlog-socket](https://github.com/bgamari/ghc-eventlog-socket).
* Target the IsList instance for ZipList at base-4.14.0.0 (#17489)Ryan Scott2019-11-231-1/+3
| | | | | | | | This moves the changelog entry about the instance from `base-4.15.0.0` to `base-4.14.0.0`. This accomplishes part (1) from #17489. [ci skip]
* Fix typo in Note reference [skip ci]nineonine2019-11-231-6/+6
|
* Bump hsc2hs submodule againBen Gamari2019-11-231-0/+0
| | | | This fixes the Darwin build.
* Bump hsc2hs submoduleBen Gamari2019-11-211-0/+0
| | | | Including Phyx's backport of the process changes fixing #17480.
* Strip parentheses in expressions contexts in error messagesVladislav Zavialov2019-11-1916-27/+31
| | | | This makes error messages a tad less noisy.
* hpc: Fix encoding issues. Add test for and fix #17073Alexey Kuleshevich2019-11-198-33/+41
| | | | | | | | | | | | | * Make sure files are being read/written in UTF-8. Set encoding while writing HTML output. Also set encoding while writing and reading .tix files although we don't yet have a ticket complaining that this poses problems. * Set encoding in html header to utf8 * Upgrade to new version of 'hpc' library and reuse `readFileUtf8` and `writeFileUtf8` functions * Update git submodule for `hpc` * Bump up `hpc` executable version Co-authored-by: Ben Gamari <ben@smart-cactus.org>
* Use pointer equality in Eq/Ord for ThreadIdRoland Zumkeller2019-11-194-17/+29
| | | | | | | | | | Changes (==) to use only pointer equality. This is safe because two threads are the same iff they have the same id. Changes `compare` to check pointer equality first and fall back on ids only in case of inequality. See discussion in #16761.
* Changing Thread IDs from 32 bits to 64 bits.Roland Zumkeller2019-11-193-6/+6
|
* nonmoving: Drop redundant write barrier on stack underflowBen Gamari2019-11-191-10/+0
| | | | | | | | | | | | | Previously we would push stack-carried return values to the new stack on a stack overflow. While the precise reasoning for this barrier is unfortunately lost to history, in hindsight I suspect it was prompted by a missing barrier elsewhere (that has been since fixed). Moreover, there the redundant barrier is actively harmful: the stack may contain non-pointer values; blindly pushing these to the mark queue will result in a crash. This is precisely what happened in the `stack003` test. However, because of a (now fixed) deficiency in the test this crash did not trigger on amd64.
* testsuite: Increase width of stack003 testBen Gamari2019-11-191-5/+11
| | | | | | Previously the returned tuple seemed to fit in registers on amd64. This meant that non-moving collector bug would cause the test to fail on i386 yet not amd64.