| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It should work to write an indefinite package using TemplateHaskell,
so long as all of the actual TH code lives outside of the package.
However, cleverness we had to build TH code even when building
with -fno-code meant that we attempted to build object code for
modules in an indefinite package, even when the signatures were
not instantiated. This patch disables said logic in the event
that an indefinite package is being typechecked.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Test Plan: validate
Reviewers: simonpj, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, carter
GHC Trac Issues: #16219
Differential Revision: https://phabricator.haskell.org/D5475
(cherry picked from commit d6d735c1114082b9e9cc1ba7da87c49f52891320)
|
|
|
|
|
|
| |
Fixes #16210
(cherry picked from commit e7e5f4aebec2f095071a1949bb4595744754ee04)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-ddump-json didn't work with --interactive as --interactive overwrote
the log_action in terms of defaultLogAction.
Reviewers: bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #14078
Differential Revision: https://phabricator.haskell.org/D4533
(cherry picked from commit 10faf44d97095b2f8516b6d449d266f6889dcd70)
|
|
|
|
|
| |
There shouldn't be any more features added to the `ghc-8.8` branch of
Haddock after this bump.
|
| |
|
|
|
|
|
|
|
|
| |
The dot type operator was handled in the 'tyvarop' parser production, and the
bang type operator in 'tyapp'. However, export lists and role annotations use
'oqtycon', so these type operators could not be exported or assigned roles.
The fix is to handle them in a lower level production, 'tyconsym'.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, our test did something like this:
1. Typecheck p
2. Typecheck q (which made use of an instantiated p)
3. Build instantiated p
4. Build instantiated q
Cabal previously permitted this, under the reasoning that during
typechecking there's no harm in using the instantiated p even if we
haven't build it yet; we'll just instantiate it on the fly with p.
However, this is not true! If q makes use of a Template Haskell
splice from p, we absolutely must have built the instantiated p
before we typecheck q, since this typechecking will need to
run some splices. Cabal now complains that you haven't done
it correctly, which we indeed have not!
Reordering so that we do this:
1. Typecheck p
3. Build instantiated p
2. Typecheck q (which made use of an instantiated p)
4. Build instantiated q
Fixes the problem. If Cabal had managed the ordering itself, it would
have gotten it right.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
(cherry picked from commit 6e3e537e419ba8d02dac306d596fba3c1029f123)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Smaller than word size integers must be promoted to word size
when passed on the stack. While on little endian systems we can
get away with writing a small integer to a word size stack slot
and read it as a word ignoring the upper bits, on big endian
systems a small integer write ends up in the most significant
bits and a word size read that ignores the upper bits delivers
a random value.
On little endian systems a smaller than word size write to
the stack might be more efficient but that decision is
system specific and should be done as an optimization in the
respective backends.
Fixes #16258
(cherry picked from commit af7b0fdb64ad1c57f5829e8bd89e8e0fa96b11d2)
|
|
|
|
|
|
| |
Fixes #16303
(cherry picked from commit 6b890d76a252259843a6e87043f8f12e6a8a0aae)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch from https://phabricator.haskell.org/D4865 introduces
go _ (HsParTy _ (dL->L l (HsStarTy _ isUni))) acc ann fix
= do { warnStarBndr l
; let name = mkOccName tcClsName (if isUni then "★" else "*")
; return (cL l (Unqual name), acc, fix, ann) }
which discards the parens annotations belonging to the HsParTy.
Updates haddock submodule
Closes #16265
(cherry picked from commit 5e9888bd9c22a1315a703f638591b50e657317c4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the code
type family F1 (a :: k) (f :: k -> Type) :: Type where
F1 @Peano a f = T @Peano f a
the API annotation for the first @ is not attached to a SourceSpan in
the ParsedSource
Closes #16236
(cherry picked from commit cbfc9fcaa33c3b341830962906543dfca1dfedd7)
|
|
|
|
|
|
|
|
|
| |
The AnnForall annotations introduced via Phab:D4894 are not always
attached to the correct SourceSpan.
Closes #16230
(cherry picked from commit be15f7457b98fa0378de7e8146c122757f03c4e9)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The parens around the kinded tyvars should be attached to the class
declaration as a whole, they are attached to the tyvar instead,
outside the span.
An annotation must always be within or after the span it is contained
in.
Closes #16212
(cherry picked from commit 4bf35da4fccd2a21153a1c19bfa80006e99e02a1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For an API annotation to be useful, it must not occur before the span
it is enclosed in.
So, for check-api-annotation output, a line such as
((Test16212.hs:3:22-36,AnnOpenP), [Test16212.hs:3:21]),
should be flagged as an error, as the AnnOpenP location of 3:21
precedes its enclosing span of 3:22-26.
This patch does this.
Closes #16217
(cherry picked from commit 3cf12e6081e7a9f0c3d515de52ffd079186816a5)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the alternate layout rule is activated via a pragma, it injects
tokens for { and } to make sure that the source is parsed properly.
But it injects ITocurly and ITccurly, rather than their virtual
counterparts ITvocurly and ITvccurly.
This causes problems for ghc-exactprint, which tries to print these.
Likewise, any injected ITsemi should have a zero-width SrcSpan.
Test case (the existing T13087.hs)
{-# LANGUAGE AlternativeLayoutRule #-}
{-# LANGUAGE LambdaCase #-}
isOne :: Int -> Bool
isOne = \case 1 -> True
_ -> False
main = return ()
Closes #16279
(cherry picked from commit c1cf2693d6efddeeeb813cd8995a1be136800d17)
(cherry picked from commit e0375ba980fd5639d23a29575efb00c30d97c743)
|
|
|
|
| |
This reverts commit e0375ba980fd5639d23a29575efb00c30d97c743.
|
|
|
|
|
|
|
|
| |
Character literals in Haddock should not be written as plain `'\n'` since
single quotes are for linking identifiers. Besides, since we want the
character literal to be monospaced, we really should use `@\'\\n\'@`.
[skip ci]
|
|
|
|
| |
See #16180.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was an awful lot of zipping going on in
canDecomposableTyConAppOK, and one of the lists being zipped
was too short, causing the result to be too short. Easily
fixed.
Also fixes #16204 and #16225
test case: typecheck/should_compile/T16188
typecheck/should_compile/T16204[ab]
typecheck/should_fail/T16204c
typecheck/should_compile/T16225
(cherry picked from commit 4a4ae70f09009c5d32696445a06eacb273f364b5)
|
|
|
|
|
|
|
|
|
|
|
|
| |
The graph allocator now dynamically resizes the number of stack
slots when running into the limit.
This fixes #8657.
Also loop membership of basic blocks is now available
in the register allocator for cost heuristics.
(cherry picked from commit 03b7abc19c8b0ec5c606cc2da208d2d004807fe9)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a regression caused by #15471 where splicing in a trivial
program such as `[|| return () ||]` would fail as the dictionary for
`return` would never get bound in the module containing the splice.
Arguably this is symptomatic of a major problem affecting TTH where we
serialise renamed asts and then retype check them. The reference to the
dictionary should be fully determined at the quote site so that splicing
doesn't have to solve any implicits at all. It's a coincidence this
works due to coherence but see #15863 and #15865 for examples where
things do go very wrong.
Fixes #16195
(cherry picked from commit a48753bdbc99cda36890e851950f5b79e1c3b2b2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This ports the fix to #12919 to the normaliser. (#12919 was about
the flattener.) Because the fix is involved, this is done by
moving the critical piece of code to Coercion, and then calling
this from both the flattener and the normaliser.
The key bit is: simplifying type families in a type is always
a *homogeneous* operation. See #12919 for a discussion of why
this is the Right Way to simplify type families.
Also fixes #15549.
test case: dependent/should_compile/T14729{,kind}
typecheck/should_compile/T15549[ab]
(cherry picked from commit 2b90356d26b4699227816ad9424e766eccdb6c36)
|
|
|
|
| |
(cherry picked from commit a08f463bcc9727d91cec4c6e952ad0f5bbc3fbf9)
|
|
|
|
|
|
| |
See #16193.
(cherry picked from commit f53ef1a72fdebeff19d4a4bd5552d25101c85147)
|
|
|
|
|
|
|
|
|
|
|
| |
Trac #16183 was caused by TH conversion (in `Convert`) not properly
inserting parentheses around occurrences of explicit signatures where
appropriate, such as in applications, function types, and type family
equations. Solution: use `parenthesizeHsType sigPrec` in these
places. While I was in town, I also updated `nlHsFunTy` to do the
same thing.
(cherry picked from commit b1e569a54085bf1093b4f858f8c7c739e3be769b)
|
|
|
|
| |
(cherry picked from commit f0cd728fde9bb582930a616cff8d0c5a178c5e14)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the alternate layout rule is activated via a pragma, it injects
tokens for { and } to make sure that the source is parsed properly.
But it injects ITocurly and ITccurly, rather than their virtual
counterparts ITvocurly and ITvccurly.
This causes problems for ghc-exactprint, which tries to print these.
Likewise, any injected ITsemi should have a zero-width SrcSpan.
Test case (the existing T13087.hs)
{-# LANGUAGE AlternativeLayoutRule #-}
{-# LANGUAGE LambdaCase #-}
isOne :: Int -> Bool
isOne = \case 1 -> True
_ -> False
main = return ()
Closes #16279
(cherry picked from commit c1cf2693d6efddeeeb813cd8995a1be136800d17)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trac #16287 shows that we were checking for unsaturated type synonym
arguments (in `:kind`) when the argument was to a type synonym, but
_not_ when the argument was to some other form of type constructor,
such as a data type. The solution is to use the machinery that
rejects unsaturated type synonym arguments (previously confined to
`check_syn_tc_app`) to `check_arg_type`, which checks these other
forms of arguments. While I was in town, I cleaned up
`check_syn_tc_app` a bit to only invoke `check_arg_type` so as to
minimize the number of different code paths that that function could
go down.
(cherry picked from commit c07e7ecbdfc05429fb6ce84c547c0365d2754db7)
|
|
|
|
|
|
| |
Also add an implementation comment for details.
(cherry picked from commit 76ac103f5021cba5cd000293c7cb8c2bd3148e7a)
|
|
|
|
| |
(cherry picked from commit 69ebf5cb4592b4c89e268937ef7eb96f7c9d4532)
|
|
|
|
|
|
| |
This was warning on i386.
(cherry picked from commit 7ff127f9e455402da183d1bb1808db024d1fa944)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit relinquishes some some type information in `.hie` files in
exchange for better performance. See #16233 for more on this.
Using `.hie` files to generate hyperlinked sources is a crucial milestone
towards Hi Haddock (the initiative to move Haddock to work over `.hi`
files and embed docstrings in those). Unfortunately, even after much
optimization on the Haddock side, the `.hie` based solution is still
considerably slower and more memory hungry than the existing implementation
- and the @.hie@ code is to blame.
This changes `.hie` file generation to track type information for only
a limited subset of expressions (specifically, those that might eventually
turn into hyperlinks in the Haddock's hyperlinker backend).
(cherry picked from commit 5ed48d25decc9dec29659482644b136cff91606e)
|
|
|
|
|
|
| |
Fixes #16222
(cherry picked from commit 4376d8811418d91bb4d19d61801e95a449b98378)
|
|
|
|
| |
(cherry picked from commit f00b35f4ddcc61fb1b1f09854bbbf38934ff0865)
|
|
|
|
|
|
|
| |
We use the shell executor on Darwin as well as Windows.
See https://gitlab.com/gitlab-org/gitlab-runner/issues/3856.
(cherry picked from commit cfbd39bd405b4cedd3ee10a6d4a2bdd89b6e2e2d)
|
|
|
|
|
|
|
| |
Why is it so hard to delete a directory's contents without deleting the
directory itself in Windows? This will forever remain a mystery.
(cherry picked from commit 6da9f4c8df7a216234ef50104e400cdcbfbc1bd4)
|
|
|
|
| |
(cherry picked from commit 79a5afb613235e93bc2c580987595b9c1324db15)
|
|
|
|
|
|
|
|
| |
Although we should use 'AC_ARG_ENABLE' for boolean flags, it also
means options get named '--enable-*', not '--with-*'. This should
unbreak the --with-intree-gmp option.
(cherry picked from commit b89b6e71c798996724ba99f273f88d8a3637fb8d)
|
|
|
|
| |
(cherry picked from commit 5cb071af5b02b7433b2bb4d06062ac8b6fb387e8)
|
|
|
|
| |
It imports System.Posix.IO.
|
|
|
|
|
| |
Otherwise the testsuite driver crashes when run multiple times with CLEANUP=NO
on a test containing such extra_files.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Previously `thNameToGhcName` was calling `lookupOrigNameCache` directly, which
failed to handle the case that the name wasn't already in the name cache. This
happens, for instance, when the name was in scope in a plugin being used during
compilation but not in scope in the module being compiled. In this case we the
interface file containing the name won't be loaded and `lookupOrigNameCache`
fails. This was the cause of #16104.
The solution is simple: use the nicely packaged `lookupOrigIO` instead.
|
| |
|
|
|
|
|
|
|
| |
Previously testing code-generation for ISA extensions was nearly impossible
since we had no ability to determine whether the host supports the needed
extension. Here we fix this by introducing a simple /proc/cpuinfo-based
testsuite predicate. We really ought to
|
|
|
| |
[skip ci]
|