summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into wip/binary-readerTwip/binary-readerTJosh Meredith2019-12-04449-3340/+3902
|\
| * Elf: Fix link info note generationBen Gamari2019-12-031-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | Previously we would use the `.int` assembler directive to generate 32-bit words in the note section. However, `.int` is note guaranteed to produce 4-bytes; in fact, on some platforms (e.g. AArch64) it produces 8-bytes. Use the `.4bytes` directive to avoid this. Moreover, we used the `.align` directive, which is quite platform dependent. On AArch64 it appears to not even be idempotent (despite what the documentation claims). `.balign` is consequentially preferred as it offers consistent behavior across platforms.
| * Simplify uniqAwayBen Gamari2019-12-038-60/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does two things: * Eliminate all uses of Unique.deriveUnique, which was quite easy to mis-use and extremely subtle. * Rename the previous "derived unique" notion to "local unique". This is possible because the only places where `uniqAway` can be safely used are those where local uniqueness (with respect to some InScopeSet) is sufficient. * Rework the implementation of VarEnv.uniqAway, as discussed in #17462. This should make the operation significantly more efficient than its previous iterative implementation.. Metric Decrease: T9872c T12227 T9233 T14683 T5030 T12545 hie002 Metric Increase: T9961
| * Drop Uniquable constraint for AnnTargetBen Gamari2019-12-036-32/+60
| | | | | | | | | | | | This relied on deriveUnique, which was far too subtle to be safely applied. Thankfully the instance doesn't appear to be used so let's just drop it.
| * users-guide: Add 8.12.1 release notesBen Gamari2019-12-032-0/+91
| |
| * Add constant folding rule (#16402)Sylvain Henry2019-12-034-6/+88
| | | | | | | | | | | | | | | | narrowN (x .&. m) m .&. (2^N-1) = 2^N-1 ==> narrowN x e.g. narrow16 (x .&. 0x12FFFF) ==> narrow16 x
| * Use Int# primops in `Bits Int{8,16,32,64}` instancesSylvain Henry2019-12-031-16/+16
| |
| * Make BCO# liftedBen Gamari2019-12-036-22/+23
| | | | | | | | | | | | | | | | | | In #17424 Simon PJ noted that there is a potentially unsafe occurrence of unsafeCoerce#, coercing from an unlifted to lifted type. However, nowhere in the compiler do we assume that a BCO# is not a thunk. Moreover, in the case of a CAF the result returned by `createBCO` *will* be a thunk (as noted in [Updatable CAF BCOs]). Consequently it seems better to rather make BCO# a lifted type and rename it to BCO.
| * Document RTS behaviour upon encountering '--'.Athas2019-12-031-1/+2
| |
| * Use the new timesInt2# primop in integer-gmp (#9431)Sylvain Henry2019-12-021-4/+19
| |
| * Add `timesInt2#` primopSylvain Henry2019-12-0211-0/+174
| |
| * configure.ac: make cross-compiler detection stricterSergei Trofimovich2019-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Be more precise at detecting cross-compilation case. Before the change configuration $ ./configure --host=x86_64-pc-linux-gnu --target=x86_64-gentoo-linux-musl was not considered a cross-target. Even though libcs are different (`glibc` vs. `musl`). Without this patch build fails as: ``` "inplace/bin/ghc-cabal" check libraries/integer-gmp "inplace/bin/ghc-cabal" configure libraries/integer-gmp dist-install \ --with-ghc="/home/slyfox/dev/git/ghc/inplace/bin/ghc-stage1" \ --with-ghc-pkg="/home/slyfox/dev/git/ghc/inplace/bin/ghc-pkg" \ --disable-library-for-ghci --enable-library-vanilla --enable-library-for-ghci \ --enable-library-profiling --enable-shared --with-hscolour="/usr/bin/HsColour" \ --configure-option=CFLAGS="-Wall \ -Werror=unused-but-set-variable -Wno-error=inline \ -iquote /home/slyfox/dev/git/ghc/libraries/integer-gmp" \ --configure-option=LDFLAGS=" " --configure-option=CPPFLAGS=" \ " --gcc-options="-Wall -Werror=unused-but-set-variable -Wno-error=inline -iquote /home/slyfox/dev/git/ghc/libraries/integer-gmp \ " --with-gcc="x86_64-gentoo-linux-musl-gcc" --with-ld="x86_64-gentoo-linux-musl-ld.gold" --with-ar="x86_64-gentoo-linux-musl-ar" \ --with-alex="/usr/bin/alex" --with-happy="/usr/bin/happy" Configuring integer-gmp-1.0.2.0... configure: WARNING: unrecognized options: --with-compiler checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu checking for gcc... /usr/lib/ccache/bin/x86_64-gentoo-linux-musl-gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... configure: error: in `/home/slyfox/dev/git/ghc/libraries/integer-gmp/dist-install/build': configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details make[1]: *** [libraries/integer-gmp/ghc.mk:5: libraries/integer-gmp/dist-install/package-data.mk] Error 1 make: *** [Makefile:126: all] Error 2 ``` Note: here `ghc-stage1` is assumed to target `musl` target but is passed `glibc` toolchain. It happens because initial ./configure phase did not detect host/target as different. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
| * gitlab-ci: Always build source tarballBen Gamari2019-12-021-0/+1
| | | | | | | | (cherry picked from commit 67b5de88ef923971f1980335137e3c7193213abd)
| * gitlab-ci: Add release-x86_64-linux-deb9 jobBen Gamari2019-12-021-0/+14
| | | | | | | | (cherry picked from commit cbedb3c4a90649f474cb716842ba53afc5a642ca)
| * testsuite: Simplify Python <3.5 fallback for TextIOBen Gamari2019-12-021-2/+5
| | | | | | | | (cherry picked from commit d092d8598694c23bc07cdcc504dff52fa5f33be1)
| * gitlab-ci: Fix Windows bindist collectionBen Gamari2019-12-021-1/+1
| | | | | | | | | | | | | | Apparently variable interpolation in the `artifacts.paths` key of `gitlab-ci.yml` doesn't work on Windows as it does on WIndows. (cherry picked from commit 100cc756faa4468ed6950116bae30609c1c3468b)
| * gitlab-ci: Add Debian 10 buildsBen Gamari2019-12-021-1/+35
| |
| * gitlab-ci: Consolidate release build configurationBen Gamari2019-12-021-23/+25
| |
| * gitlab-ci: Set LANG on CentOS 7Ben Gamari2019-12-021-0/+2
| | | | | | | | It otherwise seems to default to ascii
| * gitlab-ci: pxz is unavailable on CentOS 7Ben Gamari2019-12-022-1/+4
| | | | | | | | Fall back to xz
| * gitlab-ci: Bump Docker imagesBen Gamari2019-12-021-1/+1
| | | | | | | | | | | | Installs pxz on Centos7 (cherry picked from commit 86960e691f7a600be247c32a7cf795bf9abf7cc4)
| * 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.