| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
narrowN (x .&. m)
m .&. (2^N-1) = 2^N-1
==> narrowN x
e.g. narrow16 (x .&. 0x12FFFF) ==> narrow16 x
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
(cherry picked from commit 67b5de88ef923971f1980335137e3c7193213abd)
|
| |
| |
| |
| | |
(cherry picked from commit cbedb3c4a90649f474cb716842ba53afc5a642ca)
|
| |
| |
| |
| | |
(cherry picked from commit d092d8598694c23bc07cdcc504dff52fa5f33be1)
|
| |
| |
| |
| |
| |
| |
| | |
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)
|
| | |
|
| | |
|
| |
| |
| |
| | |
It otherwise seems to default to ascii
|
| |
| |
| |
| | |
Fall back to xz
|
| |
| |
| |
| |
| |
| | |
Installs pxz on Centos7
(cherry picked from commit 86960e691f7a600be247c32a7cf795bf9abf7cc4)
|
| |
| |
| |
| |
| |
| |
| | |
Previously we were including <sys/unistd.h> which is available on glibc
but not musl.
(cherry picked from commit e44b695ca7cb5f3f99eecfba05c9672c6a22205e)
|
| |
| |
| |
| |
| |
| |
| | |
The docutils version available appears to be too old to support the
`table` directive's `:widths:` options.
(cherry picked from commit 75764487a96a7a026948b5af5022781872d12baa)
|
| |
| |
| |
| |
| |
| | |
The `process` changes have now been merged into `hsc2hs`.
(cherry picked from commit fa029f53132ad59f847ed012d3b835452cf16615)
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
As suggested by RyanGlScott in !2163.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The code fragment
type family Proxy2' ∷ ∀ k → k → Type where
Proxy2' = Proxy'
Generates AnnRarrow instead of AnnRarrowU for the first →.
Fixes #17519
|
| |
| |
| |
| |
| | |
Since the invariants always hold in the testsuite, we can convert
them to asserts.
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
This should fix the build on Debian 8.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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`
|
| |
| |
| |
| |
| | |
This mirrors the definition of `(&&)` and `(||)` now, relieving the
Simplifier of a marginal amount of pressure.
|
| | |
|
| |
| |
| |
| |
| | |
Metric Decrease:
haddock.compiler
|
| |
| |
| |
| | |
That would be in line with the implementation.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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) }
|
| |
| |
| |
| |
| | |
Get rid of CPP macro WORDS_BIGENDIAN which is not defined anymore, and
replace it by DynFlag. This fixes partially #17337.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| | |
This reverts the change in #9096.
The specialcasing done for prefix (->) is brittle and
does not support VTA, type families, type synonyms etc.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Previously we were using AC_DEFINE instead of
AC_DEFINE_UNQUOTED, resulted in the variable not being
interpolated.
Fixes #17505.
|