| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch, GHC unconditionally printed ticks before promoted
data constructors:
ghci> type T = True -- unticked (user-written)
ghci> :kind! T
T :: Bool
= 'True -- ticked (compiler output)
After this patch, GHC prints ticks only when necessary:
ghci> type F = False -- unticked (user-written)
ghci> :kind! F
F :: Bool
= False -- unticked (compiler output)
ghci> data False -- introduce ambiguity
ghci> :kind! F
F :: Bool
= 'False -- ticked by necessity (compiler output)
The old behavior can be enabled by -fprint-redundant-promotion-ticks.
Summary of changes:
* Rename PrintUnqualified to NamePprCtx
* Add QueryPromotionTick to it
* Consult the GlobalRdrEnv to decide whether to print a tick (see mkPromTick)
* Introduce -fprint-redundant-promotion-ticks
Co-authored-by: Artyom Kuznetsov <hi@wzrd.ht>
|
|
|
|
|
| |
Necessary for newer cross-compiling backends (JS, Wasm) that don't
support TH yet.
|
|
|
|
|
|
|
|
| |
The testsuite output now contains diagnostic codes, so many tests need
to be updated at once.
We decided it was best to keep the diagnostic codes in the testsuite
output, so that contributors don't inadvertently make changes to the
diagnostic codes.
|
|
|
|
|
|
|
|
| |
The previous patch forgot to account for a type such as
Any @(TYPE (BoxedRep l))
for a quantified levity variable l.
|
|
|
|
|
|
|
|
|
|
| |
We should only accept the type `Any` in foreign import/export
declarations when it has type `Type` or `UnliftedType`.
This patch adds a kind check, and a special error message triggered by
occurrences of `Any` in foreign import/export declarations at other
kinds.
Fixes #21305
|
|
|
|
|
| |
Users are supposed to import GHC.Exts rather than GHC.Prim.
Part of #18749.
|
|
|
|
|
|
| |
- Use extension suggestion hints instead of suggesting extensions in the
error message body for several FFI errors.
- Adds a test case for `TcRnForeignImportPrimExtNotSet`
|
|
|
|
| |
Converts all uses of 'TcRnUnknownMessage' to proper diagnostics.
|
|
|
|
| |
Fixes #20272
|
| |
|
| |
|
|
|
|
| |
arguments that have an unlifted boxed type. We used to use the type of the argument. We now use the type of the foreign function. Add a test to confirm that the roundtrip conversion between an unlifted boxed type and Any is sound in the presence of a foreign function call.
|
|
|
|
|
|
|
|
| |
This replaces a panic observed in #16702 with a simple error message
stating that nested `forall`s simply aren't allowed in the type
signature of a `foreign import` (at least, not at present).
Fixes #16702.
|
|
|
|
|
| |
This moves all URL references to Trac tickets to their corresponding
GitLab counterparts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only run the test in non-threaded, compiled mode. It hangs with threaded
runtime (which stage 2 compiler uses, so disable it for ghci too).
Reviewers: simonmar, alpmestan, bgamari
Reviewed By: simonmar
Subscribers: rwbarton, carter
GHC Trac Issues: #14912
Differential Revision: https://phabricator.haskell.org/D5136
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A rather detailed summary can be found at:
https://gist.github.com/alpmestan/be82b47bb88b7dc9ff84105af9b1bb82
This doesn't fix all expectation mismatches yet, but we're down to about
20 mismatches with my previous patch and this one, as opposed to ~150
when I got started.
Test Plan: ./validate --slow
Reviewers: bgamari, erikd, simonmar
Reviewed By: simonmar
Subscribers: thomie, carter
GHC Trac Issues: #14890
Differential Revision: https://phabricator.haskell.org/D4636
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, hvr, erikd, simonmar
Reviewed By: simonmar
Subscribers: rwbarton, thomie
GHC Trac Issues: #8281, #13730.
Differential Revision: https://phabricator.haskell.org/D3619
|
|
|
|
|
|
|
|
|
|
|
|
| |
The script I used is included as testsuite/driver/kill_extra_files.py,
though at this point it is for mostly historical interest.
Some of the tests in libraries/hpc relied on extra_files.py, so this
commit includes an update to that submodule.
One test in libraries/process also relies on extra_files.py, but we
cannot update that submodule so easily, so for now we special-case it
in the test driver.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `clean_cmd` and `extra_clean` setup functions don't do anything.
Remove them from .T files.
Created using https://github.com/thomie/refactor-ghc-testsuite. This
diff is a test for the .T-file parser/processor/pretty-printer in that
repository.
find . -name '*.T' -exec ~/refactor-ghc-testsuite/Main "{}" \;
Tests containing inline comments or multiline strings are not modified.
Preparation for #12223.
Test Plan: Harbormaster
Reviewers: austin, hvr, simonmar, mpickering, bgamari
Reviewed By: mpickering
Subscribers: mpickering
Differential Revision: https://phabricator.haskell.org/D3000
GHC Trac Issues: #12223
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add prettyprinter tests, which take a file, parse it, pretty print it,
re-parse the pretty printed version and then compare the original and
new ASTs (ignoring locations)
Updates haddock submodule to match the AST changes.
There are three issues outstanding
1. Extra parens around a context are not reproduced. This will require an
AST change and will be done in a separate patch.
2. Currently if an `HsTickPragma` is found, this is not pretty-printed,
to prevent noise in the output.
I am not sure what the desired behaviour in this case is, so have left
it as before. Test Ppr047 is marked as expected fail for this.
3. Apart from in a context, the ParsedSource AST keeps all the parens from
the original source. Something is happening in the renamer to remove the
parens around visible type application, causing T12530 to fail, as the
dumped splice decl is after the renamer.
This needs to be fixed by keeping the parens, but I do not know where they
are being removed. I have amended the test to pass, by removing the parens
in the expected output.
Test Plan: ./validate
Reviewers: goldfire, mpickering, simonpj, bgamari, austin
Reviewed By: simonpj, bgamari
Subscribers: simonpj, goldfire, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D2752
GHC Trac Issues: #3384
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Foreign imports with "prim" convention require a valid symbol identifier
(see linked issue). We check this.
Fix line too long
Test Plan: Validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2563
GHC Trac Issues: #12355
|
| |
|
|
|
|
|
| |
No point in pretending other compilers can use the GHC testsuite. This
makes the *.T files a bit shorter.
|
|
|
|
|
| |
I refactored TcType FFI functions to return Validity rather than Bool,
which turned out to be an easy way to solve Trac #10461.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch was provoked by Trac #5610, which I finally got a moment to look at.
In the end I added a new data type ErrUtils.Validity,
data Validity
= IsValid -- Everything is fine
| NotValid MsgDoc -- A problem, and some indication of why
with some suitable combinators, and used it where appropriate (which touches
quite a few modules). The main payoff is that error messages improve for
FFI type validation.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
"value"s can only be imported using capi.
|
|
|
|
| |
Newtype handling in FFI decls is no longer relaxed
|
| |
|
|
|
|
|
|
|
|
| |
I think ideally we should give the info from both the old and new
messages; i.e. "You wrote X, which I reduced to Y, which isn't valid".
That way if Y is an abstract newtype then it will be clearer why
the type wasn't valid. We used to only give X, and now we only give Y.
Finding X is now a little messier, especially in cases like ccfail005.
|
| |
|
| |
|
|
|
|
| |
You can only use newtypes in the FFI if the constructor is visible
|
|
|